You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
data2dto/tests/unit/Converter/FillTest.php

46 lines
1.0 KiB

<?php
namespace Rinsvent\Data2DTO\Tests\Listener;
use Rinsvent\Data2DTO\Data2DtoConverter;
use Rinsvent\Data2DTO\Tests\unit\Converter\fixtures\FillTest\HelloRequest;
class FillTest extends \Codeception\Test\Unit
{
/**
* @var \UnitTester
*/
protected $tester;
protected function _before()
{
}
protected function _after()
{
}
// tests
public function testSuccessFillRequestData()
{
$data2DtoConverter = new Data2DtoConverter();
$data2DtoConverter->convert([
'surname' => 'asdf',
'fake_age' => 3,
'emails' => [
'sfdgsa',
'af234f',
'asdf33333'
],
'buy' => [
'phrase' => 'Buy buy!!!',
'length' => 10,
'isFirst' => true,
'extraData2' => '1234'
],
'extraData1' => 'qwer'
], HelloRequest::class);
// $this->assertEquals('Hello igor', $response->getContent());
}
}