コード例 #1
0
 public function test_extendMinimal()
 {
     $obm = \Magento\Framework\App\ObjectManager::getInstance();
     /** @var  $call \Praxigento\Downline\Service\Snap\Call */
     $call = $obm->get('Praxigento\\Downline\\Service\\Snap\\Call');
     $req = new Request\ExpandMinimal();
     $req->setTree([2 => 1, 3 => 1, 4 => 2, 5 => 2, 6 => 3, 7 => 3, 20 => 20, 10 => 7, 11 => 7, 1 => 1, 12 => 10]);
     /** @var  $resp Response\Calc */
     $resp = $call->expandMinimal($req);
     $this->assertTrue($resp->isSucceed());
 }
コード例 #2
0
 public function test_expandMinimal()
 {
     /** === Test Data === */
     $tree = [2 => 1, 3 => 1, 4 => 2, 5 => 2, 6 => 3, 7 => 3, 20 => 20, 10 => 7, 11 => 7, 1 => 1, 12 => 10, 12 => 121];
     /** === Setup Mocks === */
     /** === Call and asserts  === */
     $req = new Request\ExpandMinimal();
     $req->setTree($tree);
     $resp = $this->obj->expandMinimal($req);
     $this->assertTrue($resp->isSucceed());
     $snapData = $resp->getSnapData();
     $this->assertTrue(is_array($snapData));
 }