setUpPayment(); } protected function tearDown() { parent::tearDown(); } ///////////////////////////////////////// public function testGetPaymentsByPaymentsId_存在しない支払IDを指定した場合_結果が空になる() { $payment_id = '9999'; // 存在しないID $this->expected = null; $helper = new SC_Helper_Purchase(); $this->actual = $helper->getPaymentsByPaymentsId($payment_id); $this->verify('支払方法'); } public function testGetPaymentsByPaymentsId_存在する支払IDを指定した場合_対応する支払方法の情報が取得できる() { $payment_id = '1001'; $this->expected = array( 'payment_id' => '1001', 'payment_method' => '支払方法1001' ); $helper = new SC_Helper_Purchase(); $this->actual = $helper->getPaymentsByPaymentsId($payment_id); $this->actual = Test_Utils::mapArray($this->actual, array('payment_id', 'payment_method')); $this->verify('支払方法'); } public function testGetPaymentsByPaymentsId_削除されている支払IDを指定した場合_結果が空になる() { $payment_id = '1002'; // 削除済みのID $this->expected = null; $helper = new SC_Helper_Purchase(); $this->actual = $helper->getPaymentsByPaymentsId($payment_id); $this->verify('支払方法'); } ////////////////////////////////////////// }