Skip to content

Commit

Permalink
Merge pull request #192 from spiral/feature/view-cache-prefix
Browse files Browse the repository at this point in the history
fix tests
  • Loading branch information
wolfy-j authored Aug 8, 2017
2 parents 8714610 + 824d5cb commit 4e9d5d8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 6 additions & 1 deletion tests/Translator/LocatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ public function testGetLocales()

$config->shouldReceive('localesDirectory')->andReturn(__DIR__ . '/fixtures/locales/');

$this->assertSame(['en', 'ru'], $source->getLocales());
$compared = $source->getLocales();
$shouldBe = ['en', 'ru'];
sort($shouldBe);
sort($compared);

$this->assertSame($shouldBe, $compared);
}

public function testLoadLocale()
Expand Down
7 changes: 5 additions & 2 deletions tests/Views/StemplerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ public function testCompileWithEnvironment()

public function testRenderFromOtherLoader()
{
$this->assertSame('Hello, World!', $this->views->render('native', [
$this->deleteCacheFiles();
clearstatcache();

$this->assertContains('Hello, World!', $this->views->render('home', [
'name' => 'World'
]));

Expand All @@ -74,7 +77,7 @@ public function testRenderFromOtherLoader()
)
);

$this->assertSame('home alt', $views->render('home'));
$this->assertContains('home alt', $views->render('home'));
}

public function testRenderFromCache()
Expand Down

0 comments on commit 4e9d5d8

Please sign in to comment.