Test.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. declare(strict_types=1);
  3. use PHPUnit\Framework\TestCase;
  4. require_once __DIR__ . "/aretheythesame.php";
  5. class Check {
  6. /**
  7. * @var string
  8. */
  9. public $name;
  10. /**
  11. * @var array
  12. */
  13. public $one;
  14. /**
  15. * @var array
  16. */
  17. public $two;
  18. /**
  19. * @var bool
  20. */
  21. public $expected;
  22. public function __construct(string $name, array $a, $b, bool $expected) {
  23. $this->one = $a;
  24. $this->two = $b;
  25. $this->expected = $expected;
  26. $this->name = $name;
  27. }
  28. }
  29. class TestCompCase extends TestCase {
  30. function testComp() {
  31. $checks = [
  32. new Check(
  33. "Good",
  34. [121, 144, 19, 161, 19, 144, 19, 11],
  35. [121, 14641, 20736, 361, 25921, 361, 20736, 361],
  36. true
  37. ),
  38. new Check(
  39. "132 is not 11^2",
  40. [121, 144, 19, 161, 19, 144, 19, 11],
  41. [132, 14641, 20736, 361, 25921, 361, 20736, 361],
  42. false
  43. ),
  44. new Check(
  45. "36100 is not the square of any member of a",
  46. [121, 144, 19, 161, 19, 144, 19, 11],
  47. [121, 14641, 20736, 36100, 25921, 361, 20736, 361],
  48. false
  49. ),
  50. new Check(
  51. "Bad pair",
  52. [4, 4],
  53. [1, 31],
  54. false
  55. ),
  56. new Check(
  57. "Empty and null",
  58. [],
  59. NULL,
  60. false
  61. )
  62. ];
  63. /** @var \Check $check */
  64. foreach ($checks as $check) {
  65. $actual = comp($check->one, $check->two);
  66. }
  67. $this->assertEquals($check->expected, $actual, $check->name);
  68. }
  69. }
PANIC: session(release): write data/sessions/5/8/58062b724428edc2: no space left on device

PANIC

session(release): write data/sessions/5/8/58062b724428edc2: 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)