@@ -13,68 +13,68 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class DataProviderTest extends \PHPUnit_Framework_TestCase |
| 15 | 15 | { |
| 16 | - public function testRunExecutePopulate() |
|
| 17 | - { |
|
| 18 | - $provider = $this->getMockForAbstractClass(DataProvider::class); |
|
| 16 | + public function testRunExecutePopulate() |
|
| 17 | + { |
|
| 18 | + $provider = $this->getMockForAbstractClass(DataProvider::class); |
|
| 19 | 19 | |
| 20 | - $provider |
|
| 21 | - ->expects($this->once()) |
|
| 22 | - ->method('populate') |
|
| 23 | - ; |
|
| 20 | + $provider |
|
| 21 | + ->expects($this->once()) |
|
| 22 | + ->method('populate') |
|
| 23 | + ; |
|
| 24 | 24 | |
| 25 | - $provider->run( |
|
| 26 | - $this->getClient(), |
|
| 27 | - 'index', |
|
| 28 | - 'type', |
|
| 29 | - $this->getMock(EventDispatcherInterface::class) |
|
| 30 | - ); |
|
| 31 | - } |
|
| 25 | + $provider->run( |
|
| 26 | + $this->getClient(), |
|
| 27 | + 'index', |
|
| 28 | + 'type', |
|
| 29 | + $this->getMock(EventDispatcherInterface::class) |
|
| 30 | + ); |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - private function getClient() |
|
| 34 | - { |
|
| 35 | - return $this |
|
| 36 | - ->getMockBuilder(Client::class) |
|
| 37 | - ->disableOriginalConstructor() |
|
| 38 | - ->getMock() |
|
| 39 | - ; |
|
| 40 | - } |
|
| 33 | + private function getClient() |
|
| 34 | + { |
|
| 35 | + return $this |
|
| 36 | + ->getMockBuilder(Client::class) |
|
| 37 | + ->disableOriginalConstructor() |
|
| 38 | + ->getMock() |
|
| 39 | + ; |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | - public function testIndexWithIndexAndType() |
|
| 43 | - { |
|
| 44 | - $provider = $this->getMockForAbstractClass(DataProvider::class); |
|
| 42 | + public function testIndexWithIndexAndType() |
|
| 43 | + { |
|
| 44 | + $provider = $this->getMockForAbstractClass(DataProvider::class); |
|
| 45 | 45 | |
| 46 | - $client = $this->getClient(); |
|
| 47 | - $client |
|
| 48 | - ->expects($this->once()) |
|
| 49 | - ->method('index') |
|
| 50 | - ->with([ |
|
| 46 | + $client = $this->getClient(); |
|
| 47 | + $client |
|
| 48 | + ->expects($this->once()) |
|
| 49 | + ->method('index') |
|
| 50 | + ->with([ |
|
| 51 | 51 | 'index' => 'my_index', |
| 52 | 52 | 'type' => 'my_type', |
| 53 | 53 | 'id' => 'my_id', |
| 54 | 54 | 'body' => ['foo' => 'bar'], |
| 55 | - ]) |
|
| 56 | - ; |
|
| 55 | + ]) |
|
| 56 | + ; |
|
| 57 | 57 | |
| 58 | - $provider |
|
| 59 | - ->expects($this->once()) |
|
| 60 | - ->method('populate') |
|
| 61 | - ->will( |
|
| 58 | + $provider |
|
| 59 | + ->expects($this->once()) |
|
| 60 | + ->method('populate') |
|
| 61 | + ->will( |
|
| 62 | 62 | $this->returnCallback( |
| 63 | - function () use ($provider) { |
|
| 64 | - $provider->index( |
|
| 65 | - 'my_id', |
|
| 66 | - ['foo' => 'bar'] |
|
| 67 | - ); |
|
| 68 | - } |
|
| 63 | + function () use ($provider) { |
|
| 64 | + $provider->index( |
|
| 65 | + 'my_id', |
|
| 66 | + ['foo' => 'bar'] |
|
| 67 | + ); |
|
| 68 | + } |
|
| 69 | 69 | ) |
| 70 | - ) |
|
| 71 | - ; |
|
| 70 | + ) |
|
| 71 | + ; |
|
| 72 | 72 | |
| 73 | - $provider->run( |
|
| 74 | - $client, |
|
| 75 | - 'my_index', |
|
| 76 | - 'my_type', |
|
| 77 | - $this->getMock(EventDispatcherInterface::class) |
|
| 78 | - ); |
|
| 79 | - } |
|
| 73 | + $provider->run( |
|
| 74 | + $client, |
|
| 75 | + 'my_index', |
|
| 76 | + 'my_type', |
|
| 77 | + $this->getMock(EventDispatcherInterface::class) |
|
| 78 | + ); |
|
| 79 | + } |
|
| 80 | 80 | } |
| 81 | 81 | \ No newline at end of file |