public function testSetAction() { $this->tradeData->setAction(TradeData::ACTION_BUY); $this->assertEquals(TradeData::ACTION_BUY, $this->tradeData->getAction()); $this->tradeData->setAction('sell'); $this->assertEquals(TradeData::ACTION_SELL, $this->tradeData->getAction()); $this->tradeData->setAction('buY'); $this->assertEquals(TradeData::ACTION_BUY, $this->tradeData->getAction()); $this->setExpectedException('Exception', 'Action must be B or S'); $this->tradeData->setAction('ccc'); }