commit(); $this->news1Id = $news1->id; $this->news2Id = $news2->id; $this->news3Id = $news3->id; } /** * @throws StatusException */ function testGetDoNews() { $response = TestEnv::http()->newRequest() ->get(['api', 'news', 'news']) ->exec(); $newsStructs = $response->parseJson(); $this->assertCount(3, $newsStructs); $this->assertEquals('News 3', $newsStructs[0]['title']); $this->assertEquals('News 2', $newsStructs[1]['title']); $this->assertEquals('News 1', $newsStructs[2]['title']); } }