public function testFindOneById() { $attribute1 = $this->dummyData->getAttribute(); $this->attributeRepository->shouldReceive('findOneById')->with($attribute1->getId())->andReturn($attribute1)->once(); $attribute = $this->attributeService->findOneById($attribute1->getId()); $this->assertSame($attribute1, $attribute); }