@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | $loginManager->loginUser($firewallName, $user); |
| 40 | 40 | |
| 41 | 41 | // save the login token into the session and put it in a cookie |
| 42 | - $container->get('session')->set('_security_'.$firewallName, |
|
| 42 | + $container->get('session')->set('_security_' . $firewallName, |
|
| 43 | 43 | serialize($container->get('security.context')->getToken())); |
| 44 | 44 | $container->get('session')->save(); |
| 45 | 45 | $this->client->getCookieJar()->set(new Cookie($session->getName(), $session->getId())); |
@@ -84,24 +84,24 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | protected function assertInputValue($crawler, $key, $val) |
| 86 | 86 | { |
| 87 | - $input = $crawler->filter('input[name="'.$key.'"]'); |
|
| 87 | + $input = $crawler->filter('input[name="' . $key . '"]'); |
|
| 88 | 88 | $this->assertEquals( |
| 89 | - $val, $input->attr('value'), $key.' failed' |
|
| 89 | + $val, $input->attr('value'), $key . ' failed' |
|
| 90 | 90 | ); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | protected function assertSelectValue($crawler, $key, $val) |
| 94 | 94 | { |
| 95 | - $input = $crawler->filter('select[name="'.$key.'"]'); |
|
| 95 | + $input = $crawler->filter('select[name="' . $key . '"]'); |
|
| 96 | 96 | $selected_option = $input->filter('option[selected="selected"]'); |
| 97 | - $this->assertEquals($val, $selected_option->attr('value'), $key.' failed'); |
|
| 97 | + $this->assertEquals($val, $selected_option->attr('value'), $key . ' failed'); |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | protected function assertTextAreaValue($crawler, $key, $val) |
| 101 | 101 | { |
| 102 | - $input = $crawler->filter('textarea[name="'.$key.'"]'); |
|
| 102 | + $input = $crawler->filter('textarea[name="' . $key . '"]'); |
|
| 103 | 103 | $this->assertEquals( |
| 104 | - $val, $input->text(), $key.' failed' |
|
| 104 | + $val, $input->text(), $key . ' failed' |
|
| 105 | 105 | ); |
| 106 | 106 | } |
| 107 | 107 | |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | // List users for project |
| 15 | 15 | $url = $this->client->getContainer()->get('router')->generate('members_list', array('id' => $project->getId())); |
| 16 | 16 | $crawler = $this->client->request('GET', $url, array(), array(), array( |
| 17 | - 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 17 | + 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 18 | 18 | )); |
| 19 | 19 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET /userprojects/'); |
| 20 | 20 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | |
| 15 | 15 | // Create a new entry in the database |
| 16 | 16 | $crawler = $this->client->request('GET', $projectCreateURL); |
| 17 | - $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET '.$projectCreateURL); |
|
| 17 | + $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET ' . $projectCreateURL); |
|
| 18 | 18 | |
| 19 | 19 | // Fill in the form and submit it |
| 20 | 20 | $form = $crawler->selectButton('Create')->form(array( |
@@ -14,14 +14,14 @@ discard block |
||
| 14 | 14 | // List Issue milestones |
| 15 | 15 | $listMilestoneURL = $this->client->getContainer()->get('router')->generate('issuemilestones', array('id' => $project->getId())); |
| 16 | 16 | $crawler = $this->client->request('GET', $listMilestoneURL, array(), array(), array( |
| 17 | - 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 17 | + 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 18 | 18 | )); |
| 19 | 19 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET '.$listMilestoneURL); |
| 20 | 20 | |
| 21 | 21 | //Click New Issue Milestone Link |
| 22 | 22 | $newIssueMilestoneLink = $crawler->filter('a:contains("New Milestone")')->link(); |
| 23 | 23 | $crawler = $this->client->request($newIssueMilestoneLink->getMethod(), $newIssueMilestoneLink->getUri(), array(), array(), array( |
| 24 | - 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 24 | + 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 25 | 25 | )); |
| 26 | 26 | |
| 27 | 27 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET '.$newIssueMilestoneLink->getUri()); |
@@ -41,10 +41,10 @@ discard block |
||
| 41 | 41 | $this->assertGreaterThan(0, $crawler->filter('h1:contains("Test Milestone")')->count(), 'Missing element h1:contains("Test Milestone")'); |
| 42 | 42 | $showUrl = $this->client->getRequest()->getUri(); |
| 43 | 43 | |
| 44 | - // Edit the issue milestone |
|
| 44 | + // Edit the issue milestone |
|
| 45 | 45 | $issueMilestoneEditLink = $crawler->filter('a:contains("Edit")')->link(); |
| 46 | 46 | $crawler = $this->client->request($issueMilestoneEditLink->getMethod(), $issueMilestoneEditLink->getUri(), array(), array(), array( |
| 47 | - 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 47 | + 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 48 | 48 | )); |
| 49 | 49 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for edit issue milestone'); |
| 50 | 50 | |
@@ -62,21 +62,21 @@ discard block |
||
| 62 | 62 | //Close Milestone |
| 63 | 63 | $issueMilestoneCloseLink = $crawler->filter('a:contains("Close")')->link(); |
| 64 | 64 | $crawler = $this->client->request($issueMilestoneCloseLink->getMethod(), $issueMilestoneCloseLink->getUri(), array(), array(), array( |
| 65 | - 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 65 | + 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 66 | 66 | )); |
| 67 | 67 | $crawler = $this->client->followRedirect(); |
| 68 | 68 | $this->assertNotRegExp('/Test Milestone Edit/', $this->client->getResponse()->getContent()); |
| 69 | 69 | |
| 70 | 70 | //Open Show Issue milestone again |
| 71 | 71 | $crawler = $this->client->request('GET', $showUrl, array(), array(), array( |
| 72 | - 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 72 | + 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 73 | 73 | )); |
| 74 | 74 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for edit issue milestone'); |
| 75 | 75 | |
| 76 | 76 | //Re-open Milestone |
| 77 | 77 | $issueMilestoneReOpenLink = $crawler->filter('a:contains("Re-open")')->link(); |
| 78 | 78 | $crawler = $this->client->request($issueMilestoneReOpenLink->getMethod(), $issueMilestoneReOpenLink->getUri(), array(), array(), array( |
| 79 | - 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 79 | + 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 80 | 80 | )); |
| 81 | 81 | $crawler = $this->client->followRedirect(); |
| 82 | 82 | $this->assertGreaterThan(0, $crawler->filter('.alert:contains("has been opened")')->count(), 'Missing element .alert:contains("successfully updated")'); |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | //Close Milestone Again |
| 85 | 85 | $issueMilestoneCloseLink = $crawler->filter('a:contains("Close")')->link(); |
| 86 | 86 | $crawler = $this->client->request($issueMilestoneCloseLink->getMethod(), $issueMilestoneCloseLink->getUri(), array(), array(), array( |
| 87 | - 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 87 | + 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 88 | 88 | )); |
| 89 | 89 | $crawler = $this->client->followRedirect(); |
| 90 | 90 | $this->assertNotRegExp('/Test Milestone Edit/', $this->client->getResponse()->getContent()); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | $crawler = $this->client->request('GET', $listMilestoneURL, array(), array(), array( |
| 17 | 17 | 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
| 18 | 18 | )); |
| 19 | - $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET '.$listMilestoneURL); |
|
| 19 | + $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET ' . $listMilestoneURL); |
|
| 20 | 20 | |
| 21 | 21 | //Click New Issue Milestone Link |
| 22 | 22 | $newIssueMilestoneLink = $crawler->filter('a:contains("New Milestone")')->link(); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
| 25 | 25 | )); |
| 26 | 26 | |
| 27 | - $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET '.$newIssueMilestoneLink->getUri()); |
|
| 27 | + $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET ' . $newIssueMilestoneLink->getUri()); |
|
| 28 | 28 | |
| 29 | 29 | // Fill in the new issue milestone form and submit it |
| 30 | 30 | $form = $crawler->selectButton('Create')->form(array( |
@@ -14,14 +14,14 @@ discard block |
||
| 14 | 14 | // List Issue labels |
| 15 | 15 | $listLabelURL = $this->client->getContainer()->get('router')->generate('issuelabels', array('id' => $project->getId())); |
| 16 | 16 | $crawler = $this->client->request('GET', $listLabelURL, array(), array(), array( |
| 17 | - 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 17 | + 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 18 | 18 | )); |
| 19 | 19 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET '.$listLabelURL); |
| 20 | 20 | |
| 21 | 21 | //Click New Issue Label Link |
| 22 | 22 | $newIssueLabelLink = $crawler->filter('a:contains("New Label")')->link(); |
| 23 | 23 | $crawler = $this->client->request($newIssueLabelLink->getMethod(), $newIssueLabelLink->getUri(), array(), array(), array( |
| 24 | - 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 24 | + 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 25 | 25 | )); |
| 26 | 26 | |
| 27 | 27 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET '.$newIssueLabelLink->getUri()); |
@@ -39,10 +39,10 @@ discard block |
||
| 39 | 39 | // Check data in the show view |
| 40 | 40 | $this->assertGreaterThan(0, $crawler->filter('a:contains("Test Label")')->count(), 'Missing element a:contains("Test Label")'); |
| 41 | 41 | |
| 42 | - // Edit the issue label |
|
| 42 | + // Edit the issue label |
|
| 43 | 43 | $issueLabelEditLink = $crawler->filter('a:contains("Test Label")')->link(); |
| 44 | 44 | $crawler = $this->client->request($issueLabelEditLink->getMethod(), $issueLabelEditLink->getUri(), array(), array(), array( |
| 45 | - 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 45 | + 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 46 | 46 | )); |
| 47 | 47 | |
| 48 | 48 | $this->assertGreaterThan(0, $crawler->filter('h1:contains("Test Label")')->count(), 'Missing element h1:contains("Test Label") on Issue label show page'); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | //Click Delete link |
| 61 | 61 | $issueLabelDeleteLink = $crawler->filter('a:contains("Delete")')->link(); |
| 62 | 62 | $crawler = $this->client->request($issueLabelDeleteLink->getMethod(), $issueLabelDeleteLink->getUri(), array(), array(), array( |
| 63 | - 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 63 | + 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 64 | 64 | )); |
| 65 | 65 | $crawler = $this->client->followRedirect(); |
| 66 | 66 | $this->assertNotRegExp('/Test Label Edit/', $this->client->getResponse()->getContent()); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | $crawler = $this->client->request('GET', $listLabelURL, array(), array(), array( |
| 17 | 17 | 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
| 18 | 18 | )); |
| 19 | - $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET '.$listLabelURL); |
|
| 19 | + $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET ' . $listLabelURL); |
|
| 20 | 20 | |
| 21 | 21 | //Click New Issue Label Link |
| 22 | 22 | $newIssueLabelLink = $crawler->filter('a:contains("New Label")')->link(); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
| 25 | 25 | )); |
| 26 | 26 | |
| 27 | - $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET '.$newIssueLabelLink->getUri()); |
|
| 27 | + $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET ' . $newIssueLabelLink->getUri()); |
|
| 28 | 28 | |
| 29 | 29 | // Fill in the new issue label form and submit it |
| 30 | 30 | $form = $crawler->selectButton('Create')->form(array( |
@@ -13,10 +13,10 @@ |
||
| 13 | 13 | $project = $this->getProject($user); |
| 14 | 14 | |
| 15 | 15 | // Get File List |
| 16 | - $projectFileListURL = $this->client->getContainer()->get('router')->generate('project_filelist',array('id'=>$project->getId())); |
|
| 16 | + $projectFileListURL = $this->client->getContainer()->get('router')->generate('project_filelist', array('id'=>$project->getId())); |
|
| 17 | 17 | |
| 18 | 18 | // Create a new entry in the database |
| 19 | 19 | $crawler = $this->client->request('GET', $projectFileListURL); |
| 20 | - $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET '.$projectFileListURL); |
|
| 20 | + $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET ' . $projectFileListURL); |
|
| 21 | 21 | } |
| 22 | 22 | } |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | // List users for project |
| 15 | 15 | $url = $this->client->getContainer()->get('router')->generate('projectenvironment_new', array('id' => $project->getId())); |
| 16 | 16 | $crawler = $this->client->request('GET', $url, array(), array(), array( |
| 17 | - 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 17 | + 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 18 | 18 | )); |
| 19 | 19 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET '.$url); |
| 20 | 20 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | // List users for project |
| 50 | 50 | $url = $this->client->getContainer()->get('router')->generate('projectenvironment_existing', array('id' => $project->getId())); |
| 51 | 51 | $crawler = $this->client->request('GET', $url, array(), array(), array( |
| 52 | - 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 52 | + 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 53 | 53 | )); |
| 54 | 54 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET /userprojects/'); |
| 55 | 55 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | // List users for project |
| 81 | 81 | $url = $this->client->getContainer()->get('router')->generate('projectenvironment_clone', array('id' => $project->getId())); |
| 82 | 82 | $crawler = $this->client->request('GET', $url, array(), array(), array( |
| 83 | - 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 83 | + 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 84 | 84 | )); |
| 85 | 85 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET /userprojects/'); |
| 86 | 86 | |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | $crawler = $this->client->request('GET', $url, array(), array(), array( |
| 17 | 17 | 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
| 18 | 18 | )); |
| 19 | - $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET '.$url); |
|
| 19 | + $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET ' . $url); |
|
| 20 | 20 | |
| 21 | 21 | $gitPath = $this->createTempFolder('NewRepo'); |
| 22 | 22 | // Fill in the form and submit it |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | $container->setParameter('version_control_dynamic_discriminator_map.mapping', array()); |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 38 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 39 | 39 | $loader->load('services.yml'); |
| 40 | 40 | |
| 41 | 41 | //$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | public function __construct() |
| 37 | 37 | { |
| 38 | 38 | $this->client = new \Github\Client( |
| 39 | - new \Github\HttpClient\CachedHttpClient(array('cache_dir' => $this->getCacheDir())) |
|
| 39 | + new \Github\HttpClient\CachedHttpClient(array('cache_dir' => $this->getCacheDir())) |
|
| 40 | 40 | ); |
| 41 | 41 | } |
| 42 | 42 | |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | |
| 60 | 60 | protected function getCacheDir() |
| 61 | 61 | { |
| 62 | - $dir = dirname(__DIR__).'/../../../app/cache/githubcache'; |
|
| 62 | + $dir = dirname(__DIR__) . '/../../../app/cache/githubcache'; |
|
| 63 | 63 | |
| 64 | 64 | if (!file_exists($dir)) { |
| 65 | 65 | mkdir($dir, 0755); |