public function setUp()
 {
     parent::setUp();
     $this->prototype = $this->createPrototype();
     $this->mapper = new Mapper($this->mocks['adapter'], $this->prototype);
     $this->mapper->setSqlFactory($this->mocks['sqlFactory']);
 }
 public function setUp()
 {
     parent::setUp();
     $this->captured = new stdClass();
     $this->prototype = $this->createPrototype();
     $this->mapper = new Mapper($this->mocks['adapter'], $this->prototype);
     $this->mapper->setSqlFactory($this->mocks['sqlFactory']);
     $this->mapper->setResultsPerPage(self::RESULTS_PER_PAGE);
 }
 public function setUp()
 {
     parent::setUp();
     $this->mapper = $this->getMockBuilder('\\Test\\Synapse\\File\\GenericFileMapper')->disableOriginalConstructor()->getMock();
     $this->mapper->expects($this->any())->method('getPrototype')->willReturn(new GenericFileEntity());
     $this->service = new GenericFileService();
     if (!file_exists(self::TEST_GET_FILE)) {
         touch(self::TEST_GET_FILE);
     }
 }
 public function setUp()
 {
     parent::setUp();
     $this->prototype = $this->createPrototype();
     $this->timestampPrototype = $this->createTimestampPrototype();
     $this->mapper = new Mapper($this->mocks['adapter'], $this->prototype);
     $this->mapper->setSqlFactory($this->mocks['sqlFactory']);
     $this->timestampMapper = new TimestampColumnMapper($this->mocks['adapter'], $this->timestampPrototype);
     $this->timestampMapper->setSqlFactory($this->mocks['sqlFactory']);
     $this->datetimeMapper = new DatetimeColumnMapper($this->mocks['adapter'], $this->timestampPrototype);
     $this->datetimeMapper->setSqlFactory($this->mocks['sqlFactory']);
     $this->differentPrimaryKeyMapper = new MapperWithDifferentPrimaryKey($this->mocks['adapter'], $this->prototype);
     $this->differentPrimaryKeyMapper->setSqlFactory($this->mocks['sqlFactory']);
 }
 public function setUp()
 {
     parent::setUp();
     $this->prototype = $this->createPrototype();
     $this->timestampPrototype = $this->createTimestampPrototype();
     $this->mapper = new Mapper($this->mocks['adapter'], $this->prototype);
     $this->mapper->setSqlFactory($this->mocks['sqlFactory']);
     $this->timestampMapper = new TimestampColumnMapper($this->mocks['adapter'], $this->timestampPrototype);
     $this->timestampMapper->setSqlFactory($this->mocks['sqlFactory']);
     $this->datetimeMapper = new DatetimeColumnMapper($this->mocks['adapter'], $this->timestampPrototype);
     $this->datetimeMapper->setSqlFactory($this->mocks['sqlFactory']);
     $this->invalidAutoincrementMapper = new InvalidAutoincrementMapper($this->mocks['adapter'], $this->timestampPrototype);
     $this->invalidAutoincrementMapper->setSqlFactory($this->mocks['sqlFactory']);
 }
 public function setUp()
 {
     parent::setUp();
     $this->mapper = new GenericFileMapper($this->mockAdapter, new GenericFileEntity());
     $this->mapper->setSqlFactory($this->mockSqlFactory);
 }
Example #7
0
 public function setUp()
 {
     parent::setUp();
     $this->mapper = new UserMapper($this->mocks['adapter'], new UserEntity());
     $this->mapper->setSqlFactory($this->mocks['sqlFactory']);
 }
Example #8
0
 public function setUp()
 {
     parent::setUp();
     $this->factory = new SqlFactory();
 }