Skip to content

Commit f20f0be

Browse files
committed
expect plugin typed properties
1 parent c3dcd53 commit f20f0be

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/Plugin/ExceptTest.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Mvc5\App;
99
use Mvc5\Plugin\Call;
1010
use Mvc5\Plugin\Expect;
11+
use Mvc5\Plugin\Plugin;
1112
use Mvc5\Plugin\Value;
1213
use Mvc5\Test\Test\TestCase;
1314

@@ -21,8 +22,19 @@ function test()
2122
{
2223
$expect = new Expect('foo');
2324

24-
$this->assertEquals('foo', $expect->plugin());
25-
$this->assertNull($expect->exception());
25+
$this->assertEquals(new Value('foo'), $expect->plugin());
26+
$this->assertEquals(new Value(null), $expect->exception());
27+
}
28+
29+
/**
30+
*
31+
*/
32+
function test_resolvable()
33+
{
34+
$expect = new Expect(new Plugin('foo'), new Plugin('bar'));
35+
36+
$this->assertEquals(new Plugin('foo'), $expect->plugin());
37+
$this->assertEquals(new Plugin('bar'), $expect->exception());
2638
}
2739

2840
/**

0 commit comments

Comments
 (0)