This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace AccountServiceTest; | |
use Zend\Loader\AutoloaderFactory; | |
use Zend\Mvc\Service\ServiceManagerConfig; | |
use Zend\ServiceManager\ServiceManager; | |
use RuntimeException; | |
error_reporting(E_ALL | E_STRICT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function onBootstrap(MvcEvent $event) | |
{ | |
$eventManager = $event->getApplication()->getEventManager(); | |
$eventManager->attach(MvcEvent::EVENT_DISPATCH_ERROR, array($this, 'catchApi404Error'), 1000); | |
} | |
public function catchApi404Error(MvcEvent $e) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Codeception Test Suite Configuration | |
# suite for acceptance tests. | |
# perform tests in browser using the WebDriver or PhpBrowser. | |
# (tip: that's what your customer will see). | |
# (tip: test your ajax and javascript only with WebDriver). | |
class_name: WebGuy | |
modules: | |
enabled: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/****** IN THE MODULE.CONFIG.PHP (ZF-HAL SECTION) ***********************************/ | |
'AccountsApi\\V1\\Rest\\Utility\\UtilityEntity' => array( | |
//'identifier_name' => 'id', | |
'route_name' => 'AccountsApi.rest.accounts.utility', | |
//'hydrator' => 'ArraySerializable', | |
'hydrator' => 'AccountsApi\\V1\\Rest\\Hydrators\\UtilityEntityHydrate', | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"address": { | |
"address1": "2916 SE 125th Ave 36", | |
"address2": " sdf", | |
"city": "Portland.", | |
"state": "OR", | |
"zip": "97236", | |
"country": "USA" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Codeception Test Suite Configuration | |
# suite for acceptance tests. | |
# perform tests in browser using the Selenium-like tools. | |
# powered by Mink (http://mink.behat.org). | |
# (tip: that's what your customer will see). | |
# (tip: test your ajax and javascript by one of Mink drivers). | |
# RUN `build` COMMAND AFTER ADDING/REMOVING MODULES. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace OappAccessControl; | |
use Zend\ServiceManager\FactoryInterface; | |
use Zend\ServiceManager\ServiceLocatorInterface; | |
use Zend\ServiceManager\ServiceLocatorAwareInterface; | |
use Zend\Permissions\Acl\Acl as AccessControlList; | |
use Zend\Permissions\Acl\Role\GenericRole as Role; | |
use Zend\Permissions\Acl\Resource\GenericResource as Resource; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This makes our life easier when dealing with paths. Everything is relative | |
* to the application root now. | |
*/ | |
chdir(dirname(__DIR__)); | |
// Decline static file requests back to the PHP built-in webserver | |
if (php_sapi_name() === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) { | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Modules are in this file should only be activated in development env */ | |
return array( | |
'modules' => array('ZfTools', | |
'ZF\Apigility\Admin' | |
), | |
); |