SerializerTraitTest.php 542 B

1234567891011121314151617181920
  1. <?php
  2. namespace Jobby\Tests;
  3. class SerializerTraitTest extends \PHPUnit_Framework_TestCase
  4. {
  5. public function testGetSerializer()
  6. {
  7. $mock = $this->getObjectForTrait('Jobby\SerializerTrait');
  8. $method = new \ReflectionMethod($mock, 'getSerializer');
  9. $method->setAccessible(true);
  10. $serializer = $method->invoke($mock);
  11. $this->assertInstanceOf('\SuperClosure\Serializer', $serializer);
  12. $serializer2 = $method->invoke($mock);
  13. $this->assertSame($serializer, $serializer2);
  14. }
  15. }