realpath(dirname(__FILE__).'/../test_data/') ); Kohana::modules($new_modules); } /** * Restores the module list * * @return null */ // @codingStandardsIgnoreStart public static function teardownAfterClass() // @codingStandardsIgnoreEnd { Kohana::modules(self::$old_modules); } /** * Provider for test_instaniate * * @return array */ public function provider_instantiate() { return array( array('kohana/error', FALSE), array('test.css', FALSE), array('doesnt_exist', TRUE), ); } /** * Tests that we can instantiate a view file * * @test * @dataProvider provider_instantiate * * @return null */ public function test_instantiate($path, $expects_exception) { try { $view = new View($path); $this->assertSame(FALSE, $expects_exception); } catch(View_Exception $e) { $this->assertSame(TRUE, $expects_exception); } } }