コード例 #1
0
 public function setUp()
 {
     parent::setUp();
     $configurationProvider = $this->objectManager->get('Cundd\\Rest\\Configuration\\TypoScriptConfigurationProvider');
     $this->fixture = $this->objectManager->get('Cundd\\Rest\\Access\\ConfigurationBasedAccessController');
     $settings = array('paths' => array('1.' => array('path' => 'all', 'read' => 'allow', 'write' => 'deny'), '2.' => array('path' => 'my_ext-my_model', 'read' => 'allow', 'write' => 'allow'), '3.' => array('path' => 'my_secondext-*', 'read' => 'deny', 'write' => 'allow')));
     $configurationProvider->setSettings($settings);
     $this->fixture->setRequest($this->buildRequestWithUri('my_ext-my_model/4/usergroup'));
 }
コード例 #2
0
ファイル: ObjectManagerTest.php プロジェクト: tritumRz/rest
 public function tearDown()
 {
     // Reset the last request
     if ($this->fixture) {
         $this->fixture->getRequestFactory()->resetRequest();
     }
     unset($this->fixture);
     parent::tearDown();
 }
コード例 #3
0
 public function tearDown()
 {
     /** @var RequestFactoryInterface $requestFactory */
     if ($this->objectManager) {
         $requestFactory = $this->objectManager->get('Cundd\\Rest\\RequestFactory');
         $requestFactory->resetRequest();
     }
     unset($this->fixture);
     unset($_GET['u']);
     parent::tearDown();
 }
コード例 #4
0
ファイル: FeUserProviderTest.php プロジェクト: tritumRz/rest
 public function setUp()
 {
     parent::setUp();
     $this->fixture = new FeUserProvider();
     $databaseConnection = $this->getDatabaseConnection();
     $databaseConnection->sql_query('ALTER TABLE fe_users ADD tx_rest_apikey TINYTEXT;');
     if ($databaseConnection->sql_errno() && $databaseConnection->sql_errno() != 1060) {
         throw new \Exception($databaseConnection->sql_error());
     }
     $this->importDataSet(__DIR__ . '/../Fixtures/login.xml');
 }
コード例 #5
0
ファイル: ResponseFactoryTest.php プロジェクト: tritumRz/rest
 /**
  * @inheritDoc
  */
 public function setUp()
 {
     parent::setUp();
     $this->requestFactory = $this->objectManager->get('Cundd\\Rest\\RequestFactoryInterface');
     $this->fixture = $this->objectManager->get('Cundd\\Rest\\ResponseFactory');
 }
コード例 #6
0
ファイル: DataProviderTest.php プロジェクト: tritumRz/rest
 public function tearDown()
 {
     unset($this->fixture);
     parent::tearDown();
 }
コード例 #7
0
ファイル: CacheTest.php プロジェクト: tritumRz/rest
 protected function tearDown()
 {
     unset($this->fixture);
     parent::tearDown();
 }
コード例 #8
0
 public function setUp()
 {
     parent::setUp();
     $this->fixture = $this->objectManager->get('Cundd\\Rest\\Configuration\\TypoScriptConfigurationProvider');
 }