ExampleTest.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace Tests\Unit;
  3. use App\Post;
  4. use Carbon\Carbon;
  5. use Tests\TestCase;
  6. use Illuminate\Foundation\Testing\DatabaseMigrations;
  7. use Illuminate\Foundation\Testing\DatabaseTransactions;
  8. class ExampleTest extends TestCase
  9. {
  10. use DatabaseTransactions;
  11. /**
  12. * A basic test example.
  13. *
  14. * @return void
  15. */
  16. public function testBasicTest()
  17. {
  18. // $this->assertTrue(true);
  19. // Given
  20. // - I have two post records in the database
  21. // - They are posted a month apart
  22. $firstPost = factory(Post::class)->create();
  23. $secondPost = factory(Post::class)->create([
  24. 'created_at' => Carbon::now()->subMonth(),
  25. ]);
  26. // When I fetch the archives...
  27. $posts = Post::archives();
  28. // Then the response should be in the proper format.
  29. $this->assertCount(2, $posts);
  30. $this->assertSame([
  31. [
  32. 'year' => (int) $firstPost->created_at->format('Y'),
  33. 'month' => $firstPost->created_at->format('F'),
  34. 'published' => 1,
  35. ],
  36. [
  37. 'year' => (int) $secondPost->created_at->format('Y'),
  38. 'month' => $secondPost->created_at->format('F'),
  39. 'published' => 1,
  40. ],
  41. ], $posts);
  42. }
  43. }
PANIC: session(release): write data/sessions/9/c/9c466eb0fc941a30: no space left on device

PANIC

session(release): write data/sessions/9/c/9c466eb0fc941a30: 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)