LoaderFactoryTest.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. namespace Fgm\ComposerCheck\Tests;
  3. use Fgm\ComposerCheck\LoaderFactory;
  4. /**
  5. * Class LoaderFactoryTest.
  6. *
  7. * @coversDefaultClass \Fgm\ComposerCheck\LoaderFactory
  8. */
  9. class LoaderFactoryTest extends \PHPUnit_Framework_TestCase {
  10. const NS = 'Fgm\\ComposerCheck\\';
  11. /**
  12. * Test the normal construction case.
  13. *
  14. * @covers ::__construct()
  15. * @covers ::validateDirectory()
  16. */
  17. public function testHappyConstructor() {
  18. // This is a Composer project, so it should be installed to run its tests.
  19. $dir = __DIR__ . '/../..';
  20. $factory = new LoaderFactory($dir);
  21. $this->assertInstanceOf(self::NS . 'LoaderFactory', $factory);
  22. }
  23. /**
  24. * Tests constructing on an existing directory with missing composer files.
  25. *
  26. * @covers ::__construct()
  27. * @covers ::validateDirectory()
  28. *
  29. * @expectedException \InvalidArgumentException
  30. */
  31. public function testSadConstructorMissing() {
  32. $dir = __DIR__;
  33. new LoaderFactory($dir);
  34. }
  35. /**
  36. * Tests constructing on a missing directory.
  37. *
  38. * @covers ::__construct()
  39. * @covers ::validateDirectory()
  40. *
  41. * @expectedException \InvalidArgumentException
  42. */
  43. public function testSadConstructorInvalid() {
  44. $dir = '/dev/null/nowhere';
  45. new LoaderFactory($dir);
  46. }
  47. /**
  48. * Testes a successful load for requirements and lock.
  49. *
  50. * @covers ::createLoader()
  51. */
  52. public function testHappyCreateLoader() {
  53. $dir = __DIR__ . '/../..';
  54. $factory = new LoaderFactory($dir);
  55. $loader = $factory->createLoader('requirements');
  56. $this->assertInstanceOf(self::NS . 'RequirementsLoader', $loader);
  57. $loader = $factory->createLoader('lock');
  58. $this->assertInstanceOf(self::NS . 'LockLoader', $loader);
  59. }
  60. /**
  61. * Tests an attempt to load an invalid type of composer file.
  62. *
  63. * @covers ::createLoader()
  64. *
  65. * @expectedException \InvalidArgumentException
  66. */
  67. public function testSadCreateLoader() {
  68. $dir = __DIR__ . '/../..';
  69. $factory = new LoaderFactory($dir);
  70. $factory->createLoader('invalid');
  71. }
  72. }
PANIC: session(release): write data/sessions/1/8/18c4387850e5057e: no space left on device

PANIC

session(release): write data/sessions/1/8/18c4387850e5057e: no space left on device
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/session@v1.0.3/session.go:204 (0xb13e07)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:80 (0x967b75)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:114 (0x967bf6)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/recovery.go:161 (0x15baec4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/logger.go:40 (0x96b257)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:187 (0x972959)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:304 (0x973a01)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/macaron.go:218 (0x96c572)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:3311 (0x85a5cd)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:2073 (0x837f6f)
/my/cache/.heroku/go/go1.26.3/go/src/runtime/asm_amd64.s:1771 (0x493380)