|
@@ 104-118 (lines=15) @@
|
| 101 |
|
}
|
| 102 |
|
|
| 103 |
|
|
| 104 |
|
public function testFromArray()
|
| 105 |
|
{
|
| 106 |
|
$auction = $this->getMockBuilder(Auction::class)
|
| 107 |
|
->setMethods(['fromArray'])
|
| 108 |
|
->getMock();
|
| 109 |
|
|
| 110 |
|
$auction->expects($this->once())
|
| 111 |
|
->method('fromArray')
|
| 112 |
|
->with($this->getTestFidArray())
|
| 113 |
|
->willReturn(null);
|
| 114 |
|
|
| 115 |
|
$decorator = $this->getDecorator($auction);
|
| 116 |
|
|
| 117 |
|
$decorator->fromArray($this->getTestArray());
|
| 118 |
|
}
|
| 119 |
|
|
| 120 |
|
|
| 121 |
|
public function testToArray()
|
|
@@ 121-134 (lines=14) @@
|
| 118 |
|
}
|
| 119 |
|
|
| 120 |
|
|
| 121 |
|
public function testToArray()
|
| 122 |
|
{
|
| 123 |
|
$auction = $this->getMockBuilder(Auction::class)
|
| 124 |
|
->setMethods(['toArray'])
|
| 125 |
|
->getMock();
|
| 126 |
|
|
| 127 |
|
$auction->expects($this->once())
|
| 128 |
|
->method('toArray')
|
| 129 |
|
->willReturn($this->getTestFidArray());
|
| 130 |
|
|
| 131 |
|
$decorator = $this->getDecorator($auction);
|
| 132 |
|
|
| 133 |
|
$this->assertSame($this->getTestArray(), $decorator->toArray());
|
| 134 |
|
}
|
| 135 |
|
|
| 136 |
|
|
| 137 |
|
|
|
@@ 138-151 (lines=14) @@
|
| 135 |
|
|
| 136 |
|
|
| 137 |
|
|
| 138 |
|
public function testSetPhotos()
|
| 139 |
|
{
|
| 140 |
|
$auction = $this->getMockBuilder(Auction::class)
|
| 141 |
|
->setMethods(['setPhotos'])
|
| 142 |
|
->getMock();
|
| 143 |
|
|
| 144 |
|
$auction->expects($this->once())
|
| 145 |
|
->method('setPhotos')
|
| 146 |
|
->with($this->getTestPhotoArray())
|
| 147 |
|
->willReturn(null);
|
| 148 |
|
|
| 149 |
|
$decorator = $this->getDecorator($auction);
|
| 150 |
|
$decorator->setPhotos($this->getTestPhotoArray());
|
| 151 |
|
}
|
| 152 |
|
|
| 153 |
|
|
| 154 |
|
public function testToApiRepresentation()
|