| Total Complexity | 4 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class SymfonyTest extends \PHPUnit\Framework\TestCase |
||
| 13 | { |
||
| 14 | private $object; |
||
| 15 | private $mock; |
||
|
|
|||
| 16 | |||
| 17 | |||
| 18 | protected function setUp() : void |
||
| 19 | { |
||
| 20 | $view = new \Aimeos\Base\View\Standard(); |
||
| 21 | $files = array( 'test' => array( 'file' => array( |
||
| 22 | 'name' => 'test.txt', |
||
| 23 | 'type' => 'text/plain', |
||
| 24 | 'tmp_name' => tempnam( sys_get_temp_dir(), 'ai-symfony_' ), |
||
| 25 | 'error' => UPLOAD_ERR_OK, |
||
| 26 | 'size' => 123 |
||
| 27 | ) ) ); |
||
| 28 | $param = array( 'HTTP_HOST' => 'localhost', 'REMOTE_ADDR' => '127.0.0.1' ); |
||
| 29 | $request = new \Symfony\Component\HttpFoundation\Request( [], [], [], [], $files, $param, 'Content' ); |
||
| 30 | $this->object = new \Aimeos\Base\View\Helper\Request\Symfony( $view, $request ); |
||
| 31 | } |
||
| 32 | |||
| 33 | |||
| 34 | public function testTransform() |
||
| 35 | { |
||
| 36 | $this->assertInstanceOf( '\Aimeos\Base\View\Helper\Request\Symfony', $this->object->transform() ); |
||
| 37 | } |
||
| 38 | |||
| 39 | |||
| 40 | public function testGetClientAddress() |
||
| 41 | { |
||
| 42 | $this->assertEquals( '127.0.0.1', $this->object->getClientAddress() ); |
||
| 43 | } |
||
| 44 | |||
| 45 | |||
| 46 | public function testGetTarget() |
||
| 49 | } |
||
| 50 | } |
||
| 51 |