/
DefinitionTest.php
39 lines (31 loc) · 1006 Bytes
/
DefinitionTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/*
* This file is part of Mandango.
*
* (c) Pablo Díez <pablodip@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Mandango\Mondator\Tests;
use Mandango\Mondator\Definition;
use Mandango\Mondator\Output;
class DefinitionTest extends \PHPUnit_Framework_TestCase
{
public function testConstructor()
{
$output = new Output('foo', true);
$definition = new Definition('Model\User', $output);
$this->assertSame('Model\User', $definition->getClass());
$this->assertSame($output, $definition->getOutput());
}
public function testSetGetOutput()
{
$output1 = new Output('foo');
$output2 = new Output('bar');
$definition = new Definition('User', $output1);
$this->assertSame($output1, $definition->getOutput());
$definition->setOutput($output2);
$this->assertSame($output2, $definition->getOutput());
}
}