@@ -682,6 +682,9 @@ discard block |
||
682 | 682 | return $mapping; |
683 | 683 | } |
684 | 684 | |
685 | + /** |
|
686 | + * @param string $idKey |
|
687 | + */ |
|
685 | 688 | private function getProductMetadata($idKey) |
686 | 689 | { |
687 | 690 | $productMetadata = new ClassMetadata( |
@@ -699,6 +702,9 @@ discard block |
||
699 | 702 | return $productMetadata; |
700 | 703 | } |
701 | 704 | |
705 | + /** |
|
706 | + * @param string $idKey |
|
707 | + */ |
|
702 | 708 | private function getCartItemDetailMetadata($idKey) |
703 | 709 | { |
704 | 710 | $cartItemDetailMetadata = new ClassMetadata( |
@@ -719,6 +725,9 @@ discard block |
||
719 | 725 | return $cartItemDetailMetadata; |
720 | 726 | } |
721 | 727 | |
728 | + /** |
|
729 | + * @param string $idKey |
|
730 | + */ |
|
722 | 731 | private function getCartItemMetadata($idKey) |
723 | 732 | { |
724 | 733 | $cartItemMetadata = new ClassMetadata( |
@@ -745,6 +754,9 @@ discard block |
||
745 | 754 | return $cartItemMetadata; |
746 | 755 | } |
747 | 756 | |
757 | + /** |
|
758 | + * @param string $idKey |
|
759 | + */ |
|
748 | 760 | private function getCartMetadata($idKey) |
749 | 761 | { |
750 | 762 | $cartMetadata = new ClassMetadata( |
@@ -772,7 +784,7 @@ discard block |
||
772 | 784 | * createNewCart |
773 | 785 | * |
774 | 786 | * @access private |
775 | - * @return AbstractModel |
|
787 | + * @return \Mapado\RestClientSdk\Tests\Model\Cart |
|
776 | 788 | */ |
777 | 789 | private function createNewCart() |
778 | 790 | { |
@@ -791,7 +803,7 @@ discard block |
||
791 | 803 | * createCart |
792 | 804 | * |
793 | 805 | * @access private |
794 | - * @return void |
|
806 | + * @return \Mapado\RestClientSdk\Tests\Model\Cart |
|
795 | 807 | */ |
796 | 808 | private function createCart() |
797 | 809 | { |
@@ -805,7 +817,7 @@ discard block |
||
805 | 817 | * createKnownCartItem |
806 | 818 | * |
807 | 819 | * @access private |
808 | - * @return AbstractModel |
|
820 | + * @return \Mapado\RestClientSdk\Tests\Model\CartItem |
|
809 | 821 | */ |
810 | 822 | private function createKnownCartItem() |
811 | 823 | { |
@@ -826,7 +838,7 @@ discard block |
||
826 | 838 | * createNewCartItem |
827 | 839 | * |
828 | 840 | * @access private |
829 | - * @return AbstractModel |
|
841 | + * @return \Mapado\RestClientSdk\Tests\Model\CartItem |
|
830 | 842 | */ |
831 | 843 | private function createNewCartItem($addKnownedProduct = true) |
832 | 844 | { |
@@ -849,7 +861,7 @@ discard block |
||
849 | 861 | * createNewProduct |
850 | 862 | * |
851 | 863 | * @access private |
852 | - * @return AbstractModel |
|
864 | + * @return \Mapado\RestClientSdk\Tests\Model\Product |
|
853 | 865 | */ |
854 | 866 | private function createNewProduct() |
855 | 867 | { |
@@ -866,7 +878,7 @@ discard block |
||
866 | 878 | * createKnownedProduct |
867 | 879 | * |
868 | 880 | * @access private |
869 | - * @return AbstractModel |
|
881 | + * @return \Mapado\RestClientSdk\Tests\Model\Product |
|
870 | 882 | */ |
871 | 883 | private function createKnownedProduct() |
872 | 884 | { |
@@ -889,6 +901,7 @@ discard block |
||
889 | 901 | * createNewInstance |
890 | 902 | * |
891 | 903 | * @access private |
904 | + * @param Mapping $mapping |
|
892 | 905 | * @return void |
893 | 906 | */ |
894 | 907 | private function createNewInstance($mapping = null) |
@@ -917,6 +930,9 @@ discard block |
||
917 | 930 | $this->testedInstance->setSdk($sdk); |
918 | 931 | } |
919 | 932 | |
933 | + /** |
|
934 | + * @param string $modelName |
|
935 | + */ |
|
920 | 936 | private function getCartRepositoryMock($sdk, $restClient, $modelName) |
921 | 937 | { |
922 | 938 | $repository = new \mock\Mapado\RestClientSdk\EntityRepository( |
@@ -340,10 +340,10 @@ discard block |
||
340 | 340 | $this |
341 | 341 | ->if($repository->findBy(['section' => $section1])) |
342 | 342 | // ->then(ldd(iterator_to_array($arrayAdapter->getItems()))) |
343 | - ->then |
|
344 | - ->mock($this->mockedRestClient) |
|
345 | - ->call('get') |
|
346 | - ->withArguments('/sections?section=%2Fsections%2F1')->once() |
|
343 | + ->then |
|
344 | + ->mock($this->mockedRestClient) |
|
345 | + ->call('get') |
|
346 | + ->withArguments('/sections?section=%2Fsections%2F1')->once() |
|
347 | 347 | |
348 | 348 | ->if($repository->findAll()) |
349 | 349 | // ->then(ldd(iterator_to_array($arrayAdapter->getItems()))) |
@@ -351,11 +351,11 @@ discard block |
||
351 | 351 | ->boolean($arrayAdapter->hasItem('test_prefix__sections_1')) |
352 | 352 | ->isTrue() |
353 | 353 | |
354 | - ->if($repository->find(1)) |
|
355 | - ->then |
|
356 | - ->mock($this->mockedRestClient) |
|
357 | - ->call('get') |
|
358 | - ->withArguments('/sections/1')->never() |
|
354 | + ->if($repository->find(1)) |
|
355 | + ->then |
|
356 | + ->mock($this->mockedRestClient) |
|
357 | + ->call('get') |
|
358 | + ->withArguments('/sections/1')->never() |
|
359 | 359 | |
360 | 360 | // after update |
361 | 361 | ->if($repository->update($section1)) |