Completed
Push — develop ( e1bb7c...f2e809 )
by Dylan
02:52
created
tests/AutomatedLinkTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 
5 5
     public static $fixture_file = 'fixtures/AutomatedLinkTest.yml';
6 6
 
7
-    public function testInsertion(){
8
-        $this->objFromFixture('AutomatedLink','link1');
7
+    public function testInsertion() {
8
+        $this->objFromFixture('AutomatedLink', 'link1');
9 9
 
10 10
         $page   = $this->createPage('test-1', '<p>Checking if phrase is replaced</p>');
11 11
         $dom    = $this->getPageDOM($page);
@@ -13,11 +13,11 @@  discard block
 block discarded – undo
13 13
 
14 14
         $this->assertTrue($links->length == 1);
15 15
 
16
-        if($links->length == 1){
16
+        if ($links->length == 1) {
17 17
             $link = $links->item(0);
18
-            $this->assertTrue( $link->getAttribute('title') == 'title 1' );
19
-            $this->assertTrue( $link->getAttribute('target') == '_blank' );
20
-            $this->assertTrue( $link->getAttribute('rel') == '' );
18
+            $this->assertTrue($link->getAttribute('title') == 'title 1');
19
+            $this->assertTrue($link->getAttribute('target') == '_blank');
20
+            $this->assertTrue($link->getAttribute('rel') == '');
21 21
         }
22 22
     }
23 23
 
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
      * @param string|null $content
28 28
      * @return Page
29 29
      */
30
-    private function createPage($content=null){
31
-        $page = Page::create(array( 'Content' => $content ));
30
+    private function createPage($content = null) {
31
+        $page = Page::create(array('Content' => $content));
32 32
         $page->write();
33 33
         return $page;
34 34
     }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      * @param Page $page
40 40
      * @return DOMDocument
41 41
      */
42
-    private function getPageDOM(Page $page){
42
+    private function getPageDOM(Page $page) {
43 43
         $controller = Page_Controller::create($page);
44 44
         $controller->invokeWithExtensions('addAutomatedLinks');
45 45
         return AutomatedLink::constructDOMDocument($controller->Content);
Please login to merge, or discard this patch.
_config.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@
 block discarded – undo
6 6
  *
7 7
  */
8 8
 
9
-define( 'SEOTOOLBOX_DIR', str_replace( Director::baseFolder().'/', '', __DIR__ ) );
9
+define('SEOTOOLBOX_DIR', str_replace(Director::baseFolder().'/', '', __DIR__));
10 10
 
11 11
 Config::inst()->update('SEOToolboxAdmin', 'menu_icon', SEOTOOLBOX_DIR.'/code/admin/icon/seotoolbox-icon.png');
12
-Config::inst()->update('LeftAndMain','extra_requirements_javascript', array(SEOTOOLBOX_DIR.'/js/seo_page_analyzer.js'));
13
-Config::inst()->update('LeftAndMain','extra_requirements_css', array(SEOTOOLBOX_DIR.'/css/seo_page_analyzer.css'));
12
+Config::inst()->update('LeftAndMain', 'extra_requirements_javascript', array(SEOTOOLBOX_DIR.'/js/seo_page_analyzer.js'));
13
+Config::inst()->update('LeftAndMain', 'extra_requirements_css', array(SEOTOOLBOX_DIR.'/css/seo_page_analyzer.css'));
14 14
 
15 15
 CMSMenu::add_link('seotest', 'Run Crawler', '/seotest', 9, array('target' => '_blank'));
16 16
 Requirements::customCSS('.icon.icon-16.icon-seotest{background:url('.SEOTOOLBOX_DIR.'/code/admin/icon/crawl-icon.png)}');
17 17
 
18
-if(Director::is_cli()){
18
+if (Director::is_cli()) {
19 19
     Config::inst()->update('Director', 'environment_type', 'dev');
20 20
 }
Please login to merge, or discard this patch.