Skip to content

Commit 693d83d

Browse files
committed
Added missing tests
1 parent 6843f2f commit 693d83d

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

test/Unit/Presentation/TemplateTest.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,28 @@ public function testMagicGetDoesNotExist()
3939

4040
$this->assertNull($template->foo);
4141
}
42+
43+
/**
44+
* @covers OpCacheGUI\Presentation\Template::__construct
45+
* @covers OpCacheGUI\Presentation\Template::__isset
46+
*/
47+
public function testMagicIssetExists()
48+
{
49+
$template = new TemplateMock(__DIR__, $this->getMock('\\OpCacheGUI\\I18n\\Translator'));
50+
51+
$template->set('foo', 'bar');
52+
53+
$this->assertTrue(isset($template->foo));
54+
}
55+
56+
/**
57+
* @covers OpCacheGUI\Presentation\Template::__construct
58+
* @covers OpCacheGUI\Presentation\Template::__isset
59+
*/
60+
public function testMagicIssetDoesNotExist()
61+
{
62+
$template = new TemplateMock(__DIR__, $this->getMock('\\OpCacheGUI\\I18n\\Translator'));
63+
64+
$this->assertFalse(isset($template->foo));
65+
}
4266
}

0 commit comments

Comments
 (0)