1 | <?php |
||
7 | class FeatureTest extends AbstractTestCase |
||
8 | { |
||
9 | //temp method just to include this mapper |
||
10 | public function testInstantiate() |
||
11 | { |
||
12 | $mapper = $this->getMapper(); |
||
13 | $this->assertTrue($mapper instanceof \SpeckCatalog\Mapper\Feature); |
||
14 | } |
||
15 | |||
16 | public function testGetByProductIdReturnsArrayOfFeatureModels() |
||
17 | { |
||
18 | $testMapper = $this->getTestMapper(); |
||
19 | $testMapper->insert(array('product_id' => 88), 'catalog_product_feature'); |
||
20 | |||
21 | $mapper = $this->getMapper(); |
||
22 | $return = $mapper->getByProductId(88); |
||
23 | $this->assertTrue(is_array($return)); |
||
24 | $this->assertInstanceOf('\SpeckCatalog\Model\Feature', $return[0]); |
||
25 | } |
||
26 | |||
27 | public function getMapper() |
||
31 | } |
||
32 |