コード例 #1
0
ファイル: VariantTest.php プロジェクト: GerDner/luck-docker
 /**
  * @depends testCreateShouldBeSuccessful
  * @param $article \Shopware\Models\Article\Article
  * @return $article \Shopware\Models\Article\Article
  */
 public function testGetOneShouldBeSuccessful($article)
 {
     $this->resource->setResultMode(\Shopware\Components\Api\Resource\Variant::HYDRATE_OBJECT);
     /** @var $articleDetail \Shopware\Models\Article\Detail */
     foreach ($article->getDetails() as $articleDetail) {
         $articleDetailById = $this->resource->getOne($articleDetail->getId());
         $articleDetailByNumber = $this->resource->getOneByNumber($articleDetail->getNumber());
         $this->assertEquals($articleDetail->getId(), $articleDetailById->getId());
         $this->assertEquals($articleDetail->getId(), $articleDetailByNumber->getId());
     }
     return $article;
 }