From 1ed2ed90aadec83dad718c1e54557b3ecd9c9b04 Mon Sep 17 00:00:00 2001 From: bzick Date: Wed, 20 Feb 2013 18:12:23 +0400 Subject: [PATCH] Add provider test --- tests/cases/Aspect/Provider/ProviderTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/cases/Aspect/Provider/ProviderTest.php b/tests/cases/Aspect/Provider/ProviderTest.php index f718020..ed51a7b 100644 --- a/tests/cases/Aspect/Provider/ProviderTest.php +++ b/tests/cases/Aspect/Provider/ProviderTest.php @@ -2,13 +2,16 @@ namespace Aspect\Provider; use Aspect; -class FSTest extends \PHPUnit_Framework_TestCase { +class FSTest extends \Aspect\TestCase { /** * @var Provider */ public $provider; public function setUp() { + parent::setUp(); + $this->tpl("template1.tpl", 'Template 1 {$a}'); + $this->tpl("template2.tpl", 'Template 2 {$a}'); $this->provider = new FS(ASPECT_RESOURCES.'/template'); } @@ -45,7 +48,8 @@ class FSTest extends \PHPUnit_Framework_TestCase { } public function testGetLastModifiedBatch() { - $times = $this->provider->getLastModifiedBatch(array("template1.tpl", "template2.tpl", "parent.tpl")); + $times = $this->provider->getLastModifiedBatch($tpls = array("template1.tpl", "template2.tpl")); + $this->assertSame($tpls, array_keys($times)); clearstatcache(); foreach($times as $template => $time) { $this->assertEquals(filemtime(ASPECT_RESOURCES."/template/$template"), $time);