コード例 #1
0
ファイル: TaskTest.php プロジェクト: ruslanas/stream
 public function setUp()
 {
     parent::setUp();
     $this->session = $this->getMockBuilder(\Stream\Session::class)->getMock();
     $this->task = new Tasks\model\Task($this->pdo);
     $this->task->uses(['Session', $this->session]);
 }
コード例 #2
0
ファイル: AclTest.php プロジェクト: ruslanas/stream
 public function setUp()
 {
     parent::setUp();
     $this->acl = new Acl();
     $this->session = $this->getMockBuilder(\Stream\Session::class)->getMock();
     $this->acl->uses(['Session', $this->session]);
     $this->acl->uses(new \modules\Users\model\User($this->pdo));
 }
コード例 #3
0
ファイル: UserTest.php プロジェクト: ruslanas/stream
 public function setUp()
 {
     parent::setUp();
     $this->req = $this->getMockBuilder(Request::class)->getMock();
     $this->user = new User($this->pdo);
 }
コード例 #4
0
 public function setUp()
 {
     parent::setUp();
     $dsl = ['posts', ['id', PDO::PARAM_INT], ['title', PDO::PARAM_STR], ['body', PDO::PARAM_STR], ['deleted', PDO::PARAM_BOOL], ['users as user', [['id', PDO::PARAM_INT], ['email', PDO::PARAM_STR], ['deleted', PDO::PARAM_BOOL]], 'user.id = posts.user_id']];
     $this->storage = new PersistentStorage($this->pdo, $dsl);
 }
コード例 #5
0
 public function setUp()
 {
     parent::setUp();
     $this->task = new \modules\Tasks\Decorators\Task(\Stream\App::getConnection('test_stream'));
 }