public function test__mapByPv() { /** === Test Data === */ $DATA = [['CustId' => 1, 'PV' => 10], ['CustId' => 1, 'PV' => 20]]; /** === Mocks === */ $mLogger = $this->_mockLogger(); $mToolbox = $this->_mockToolbox(); $mCallDownlineSnap = $this->_mockFor('\\Praxigento\\Downline\\Service\\ISnap'); /** * Prepare request and perform call. */ /** @var $sub Calc */ $sub = new Calc($mLogger, $mToolbox, $mCallDownlineSnap); $data = $sub->_mapByPv($DATA, 'CustId', 'PV'); $this->assertTrue(is_array($data)); }