This file contains hidden or 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
/** | |
* @hidden | |
* | |
* @Then /^I switch to popup by clicking "([^"]*)"$/ | |
*/ | |
public function iSwitchToPopupByClicking($arg1) { | |
$originalWindowName = $this->getMainContext()->getSession()->getWindowName(); | |
$this->setMainWindow(); | |
$this->getMainContext()->getSession()->getPage()->clickLink("$arg1"); //Pressing the withdraw button |
This file contains hidden or 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
/** | |
* See if the element (name|label|id) is greater than the % of the window | |
* | |
* @Then /^the element "([^"]*)" should be "([^"]*)" percent or greater than the window$/ | |
*/ | |
public function theElementShouldBePercentOrGreaterThanTheWindow($arg1, $arg2) | |
{ | |
//@todo | |
$javascript_check = <<<HEREDOC | |
if(!jQuery('$arg1').length) { return "FAILED"; } |
This file contains hidden or 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
default: | |
paths: { features: features } | |
extensions: { Behat\MinkExtension\Extension: { default_session: selenium2, goutte: null, selenium2: null, base_url: 'http://behatpfizer.local/', browser_name: safari, javascript_session: selenium2 }, Drupal\DrupalExtension\Extension: { blackbox: null, api_driver: drush, drush: { alias: digitalocean.behateditorp_staging }, subcontexts: { paths: [/Users/test/Drupal/behat_vagrant/behat_pfiser/assets/example/current/sites/all/modules] } } } |
This file contains hidden or 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
/** | |
* Update a model instance in the database. | |
* | |
* @param mixed $id | |
* @param array $attributes | |
* @return int | |
*/ | |
public static function update($id, $attributes) | |
{ | |
$model = new static(array(), true); |
This file contains hidden or 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
//@TODO start using the BaseModel helper | |
$validate = Validator::make(Input::all(), Project::$rules); | |
$project = Project::find($id); | |
if($validate->passes()) { | |
$inputs = Input::all(); | |
$project->name = $inputs['name']; | |
$project->description = $inputs['description']; | |
$project->active = (isset($inputs['active'])) ? $inputs['active'] : 0; | |
$project->giturl = $inputs['giturl']; | |
$project->accountingurl = $inputs['accountingurl']; |
This file contains hidden or 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
/** | |
* Store a newly created resource in storage. | |
* | |
* @return Response | |
*/ | |
public function store() | |
{ | |
//@TODO start using the BaseModel helper | |
$validate = Validator::make(Input::all(), Project::$rules); |
This file contains hidden or 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
guard 'phpunit2', :tests_path => 'app/tests', :cli => '--colors' do | |
watch(%r{^.+Test.php$}) | |
watch(%r{app/(.+)/(.+).php}) { |m| "tests/#{m[1]}/#{m[2]}Test.php" } | |
end |
This file contains hidden or 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
/** | |
* Implements hook_services_resources() | |
*/ | |
function behat_editor_tokenizer_services_resources() { | |
return array( | |
'tokenizer' => array( | |
'retrieve' => array( | |
'help' => 'Retrieve a token record', | |
'callback' => 'behat_editor_tokenizer_callback', | |
'access callback' => 'behat_editor_tokenizer_access', |
This file contains hidden or 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
Route::get('issues', function(){ | |
return GitHubService::getIssues('alnutile', 'fis2'); | |
}); |
This file contains hidden or 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
public function getAllProjects($repoOwner) | |
{ | |
try { | |
$results = $this->client->api('user')->setPerpage('200')->repositories($repoOwner); | |
} | |
catch(\Exception $e) { | |
return $e->getMessage(); | |
} |