Completed
Push — master ( 9a605b...f9b18a )
by Jason
35s
created
tests/SlideImageTest.php 2 patches
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -2,63 +2,63 @@
 block discarded – undo
2 2
 
3 3
 class SlideImageTest extends FlexSliderTest
4 4
 {
5
-    protected static $use_draft_site = true;
5
+	protected static $use_draft_site = true;
6 6
 
7
-    public function setUp()
8
-    {
9
-        parent::setUp();
10
-    }
7
+	public function setUp()
8
+	{
9
+		parent::setUp();
10
+	}
11 11
 
12
-    public function testSlideImageCreation()
13
-    {
14
-        $this->logInWithPermission('Slide_CREATE');
15
-        $slide = $this->objFromFixture('SlideImage', 'slide1');
12
+	public function testSlideImageCreation()
13
+	{
14
+		$this->logInWithPermission('Slide_CREATE');
15
+		$slide = $this->objFromFixture('SlideImage', 'slide1');
16 16
 
17
-        $this->assertTrue($slide->canCreate());
17
+		$this->assertTrue($slide->canCreate());
18 18
 
19
-        $slideID = $slide->ID;
19
+		$slideID = $slide->ID;
20 20
 
21
-        $this->assertTrue($slideID > 0);
21
+		$this->assertTrue($slideID > 0);
22 22
 
23
-        $getSlide = SlideImage::get()->byID($slideID);
24
-        $this->assertTrue($getSlide->ID == $slideID);
25
-    }
23
+		$getSlide = SlideImage::get()->byID($slideID);
24
+		$this->assertTrue($getSlide->ID == $slideID);
25
+	}
26 26
 
27
-    public function testSlideUpdate()
28
-    {
29
-        $this->logInWithPermission('ADMIN');
30
-        $slide = $this->objFromFixture('SlideImage', 'slide1');
31
-        $slideID = $slide->ID;
27
+	public function testSlideUpdate()
28
+	{
29
+		$this->logInWithPermission('ADMIN');
30
+		$slide = $this->objFromFixture('SlideImage', 'slide1');
31
+		$slideID = $slide->ID;
32 32
 
33
-        $image = $this->objFromFixture('Image', 'image1');
34
-        $imageID = $image->ID;
33
+		$image = $this->objFromFixture('Image', 'image1');
34
+		$imageID = $image->ID;
35 35
 
36
-        $this->logOut();
36
+		$this->logOut();
37 37
 
38
-        $this->logInWithPermission('Slide_EDIT');
38
+		$this->logInWithPermission('Slide_EDIT');
39 39
 
40
-        $this->assertTrue($slide->canEdit());
41
-        $slide = SlideImage::get()->byID($slideID);
42
-        $newTitle = 'Updated Name for Slide';
43
-        $slide->Name = $newTitle;
44
-        $slide->ImageID = $imageID;
45
-        $slide->write();
40
+		$this->assertTrue($slide->canEdit());
41
+		$slide = SlideImage::get()->byID($slideID);
42
+		$newTitle = 'Updated Name for Slide';
43
+		$slide->Name = $newTitle;
44
+		$slide->ImageID = $imageID;
45
+		$slide->write();
46 46
 
47
-        $slide = SlideImage::get()->byiD($slideID);
47
+		$slide = SlideImage::get()->byiD($slideID);
48 48
 
49
-        $this->assertTrue($slide->Name == $newTitle);
50
-    }
49
+		$this->assertTrue($slide->Name == $newTitle);
50
+	}
51 51
 
52
-    public function testSlideImageDeletion()
53
-    {
54
-        $this->logInWithPermission('Slide_DELETE');
55
-        $slide = $this->objFromFixture('SlideImage', 'slide2');
56
-        $slideID = $slide->ID;
52
+	public function testSlideImageDeletion()
53
+	{
54
+		$this->logInWithPermission('Slide_DELETE');
55
+		$slide = $this->objFromFixture('SlideImage', 'slide2');
56
+		$slideID = $slide->ID;
57 57
 
58
-        $this->assertTrue($slide->canDelete());
59
-        $slide->delete();
58
+		$this->assertTrue($slide->canDelete());
59
+		$slide->delete();
60 60
 
61
-        $slides = SlideImage::get()->column('ID');
62
-        $this->assertFalse(in_array($slideID, $slides));
63
-    }
61
+		$slides = SlideImage::get()->column('ID');
62
+		$this->assertFalse(in_array($slideID, $slides));
63
+	}
64 64
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         $this->assertTrue($slideID > 0);
22 22
 
23 23
         $getSlide = SlideImage::get()->byID($slideID);
24
-        $this->assertTrue($getSlide->ID == $slideID);
24
+        $this->assertTrue($getSlide->ID==$slideID);
25 25
     }
26 26
 
27 27
     public function testSlideUpdate()
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
         $slide = SlideImage::get()->byiD($slideID);
48 48
 
49
-        $this->assertTrue($slide->Name == $newTitle);
49
+        $this->assertTrue($slide->Name==$newTitle);
50 50
     }
51 51
 
52 52
     public function testSlideImageDeletion()
Please login to merge, or discard this patch.
tests/FlexSliderTest.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -2,26 +2,26 @@
 block discarded – undo
2 2
 
3 3
 class FlexSliderTest extends FunctionalTest
4 4
 {
5
-    protected static $fixture_file = 'flexslider/tests/FlexSliderTest.yml';
6
-    protected static $disable_themes = true;
7
-    protected static $use_draft_site = false;
5
+	protected static $fixture_file = 'flexslider/tests/FlexSliderTest.yml';
6
+	protected static $disable_themes = true;
7
+	protected static $use_draft_site = false;
8 8
 
9
-    public function setUp()
10
-    {
11
-        parent::setUp();
9
+	public function setUp()
10
+	{
11
+		parent::setUp();
12 12
 
13
-        ini_set('display_errors', 1);
14
-        ini_set('log_errors', 1);
15
-        error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
16
-    }
13
+		ini_set('display_errors', 1);
14
+		ini_set('log_errors', 1);
15
+		error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
16
+	}
17 17
 
18
-    public function logOut()
19
-    {
20
-        $this->session()->clear('loggedInAs');
21
-        $this->session()->clear('logInWithPermission');
22
-    }
18
+	public function logOut()
19
+	{
20
+		$this->session()->clear('loggedInAs');
21
+		$this->session()->clear('logInWithPermission');
22
+	}
23 23
 
24
-    public function testFlexSlider()
25
-    {
26
-    }
24
+	public function testFlexSlider()
25
+	{
26
+	}
27 27
 }
Please login to merge, or discard this patch.
code/FlexSliderExtension.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -2,27 +2,27 @@  discard block
 block discarded – undo
2 2
 
3 3
 class FlexSliderExtension extends Extension
4 4
 {
5
-    public function onAfterInit()
6
-    {
5
+	public function onAfterInit()
6
+	{
7 7
 
8
-        // Flexslider options
9
-        $animate = ($this->owner->Animate) ? 'true' : 'false';
10
-        $loop = ($this->owner->Loop) ? 'true' : 'false';
11
-        $sync = ($this->owner->ThumbnailNav == true) ? "sync: '#carousel'," : '';
12
-        $before = (method_exists($this->owner->ClassName, 'flexSliderBeforeAction'))
13
-            ? $this->owner->flexSliderBeforeAction()
14
-            : 'function(){}';
15
-        $after = (method_exists($this->owner->ClassName, 'flexSliderAfterAction'))
16
-            ? $this->owner->flexSliderAfterAction()
17
-            : 'function(){}';
18
-        $speed = (method_exists($this->owner->ClassName, 'setFlexSliderSpeed'))
19
-            ? $this->owner->setFlexSliderSpeed()
20
-            : 7000;
8
+		// Flexslider options
9
+		$animate = ($this->owner->Animate) ? 'true' : 'false';
10
+		$loop = ($this->owner->Loop) ? 'true' : 'false';
11
+		$sync = ($this->owner->ThumbnailNav == true) ? "sync: '#carousel'," : '';
12
+		$before = (method_exists($this->owner->ClassName, 'flexSliderBeforeAction'))
13
+			? $this->owner->flexSliderBeforeAction()
14
+			: 'function(){}';
15
+		$after = (method_exists($this->owner->ClassName, 'flexSliderAfterAction'))
16
+			? $this->owner->flexSliderAfterAction()
17
+			: 'function(){}';
18
+		$speed = (method_exists($this->owner->ClassName, 'setFlexSliderSpeed'))
19
+			? $this->owner->setFlexSliderSpeed()
20
+			: 7000;
21 21
 
22
-        // only call custom script if page has Slides and DataExtension
23
-        if (Object::has_extension($this->owner->data()->ClassName, 'FlexSlider')) {
24
-            if ($this->owner->data()->Slides()->exists()) {
25
-                Requirements::customScript("
22
+		// only call custom script if page has Slides and DataExtension
23
+		if (Object::has_extension($this->owner->data()->ClassName, 'FlexSlider')) {
24
+			if ($this->owner->data()->Slides()->exists()) {
25
+				Requirements::customScript("
26 26
                 (function($) {
27 27
                     $(document).ready(function(){
28 28
                         $('.flexslider').flexslider({
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
                         });
46 46
                     });
47 47
                 }(jQuery));');
48
-            }
49
-        }
50
-    }
48
+			}
49
+		}
50
+	}
51 51
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
         // Flexslider options
9 9
         $animate = ($this->owner->Animate) ? 'true' : 'false';
10 10
         $loop = ($this->owner->Loop) ? 'true' : 'false';
11
-        $sync = ($this->owner->ThumbnailNav == true) ? "sync: '#carousel'," : '';
11
+        $sync = ($this->owner->ThumbnailNav==true) ? "sync: '#carousel'," : '';
12 12
         $before = (method_exists($this->owner->ClassName, 'flexSliderBeforeAction'))
13 13
             ? $this->owner->flexSliderBeforeAction()
14 14
             : 'function(){}';
Please login to merge, or discard this patch.