@@ 8-35 (lines=28) @@ | ||
5 | use Wonnova\SDK\Model\Achievement; |
|
6 | use Wonnova\SDK\Model\Notification; |
|
7 | ||
8 | class NotificationTest extends TestCase |
|
9 | { |
|
10 | /** |
|
11 | * @var Notification |
|
12 | */ |
|
13 | private $notification; |
|
14 | ||
15 | public function setUp() |
|
16 | { |
|
17 | $this->notification = new Notification(); |
|
18 | } |
|
19 | ||
20 | public function testType() |
|
21 | { |
|
22 | $expected = Achievement::TYPE_BADGE; |
|
23 | $this->assertNull($this->notification->getType()); |
|
24 | $this->assertSame($this->notification, $this->notification->setType($expected)); |
|
25 | $this->assertEquals($expected, $this->notification->getType()); |
|
26 | } |
|
27 | ||
28 | public function testMessage() |
|
29 | { |
|
30 | $expected = 'Congratulations!! You have won a badge!!'; |
|
31 | $this->assertNull($this->notification->getMessage()); |
|
32 | $this->assertSame($this->notification, $this->notification->setMessage($expected)); |
|
33 | $this->assertEquals($expected, $this->notification->getMessage()); |
|
34 | } |
|
35 | } |
|
36 |
@@ 12-39 (lines=28) @@ | ||
9 | * @author Wonnova |
|
10 | * @link http://www.wonnova.com |
|
11 | */ |
|
12 | class ScenarioTest extends TestCase |
|
13 | { |
|
14 | /** |
|
15 | * @var Scenario |
|
16 | */ |
|
17 | private $scenario; |
|
18 | ||
19 | public function setUp() |
|
20 | { |
|
21 | $this->scenario = new Scenario(); |
|
22 | } |
|
23 | ||
24 | public function testCode() |
|
25 | { |
|
26 | $expected = 'SCENARIO'; |
|
27 | $this->assertNull($this->scenario->getCode()); |
|
28 | $this->assertSame($this->scenario, $this->scenario->setCode($expected)); |
|
29 | $this->assertEquals($expected, $this->scenario->getCode()); |
|
30 | } |
|
31 | ||
32 | public function testName() |
|
33 | { |
|
34 | $expected = 'Scenario'; |
|
35 | $this->assertNull($this->scenario->getName()); |
|
36 | $this->assertSame($this->scenario, $this->scenario->setName($expected)); |
|
37 | $this->assertEquals($expected, $this->scenario->getName()); |
|
38 | } |
|
39 | } |
|
40 |