for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LAShowroom\TaxJarBundle\Tests\Model\Response;
use LAShowroom\TaxJarBundle\Model\Response\TaxResponse;
class TaxResponseTest extends \PHPUnit_Framework_TestCase
{
public function testTotalAmount()
$response = new \stdClass();
$response->order_total_amount = 1.23;
$taxResponse = new TaxResponse($response);
$this->assertEquals(1.23, $taxResponse->getTotalAmount());
$response->amount = 1.23;
}
public function testFreighTaxable()
$response->freight_taxable = 1;
$this->assertTrue($taxResponse->isFreightTaxable());
public function testTransactionReferenceId()
$response->transaction_reference_id = 'doge';
$this->assertEquals('doge', $taxResponse->getTransactionReferenceId());