Passed
Push — 2.0 ( 0743fa...1fd5b9 )
by
unknown
02:41
created
src/Extensions/CwpSiteSummaryExtension.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -6,18 +6,18 @@
 block discarded – undo
6 6
 class CwpSiteSummaryExtension extends Extension
7 7
 {
8 8
 
9
-    /**
10
-     * Updates the modules used for the version label by:
11
-     *  - Removing SS Framework
12
-     *  - Adding CWP
13
-     *  - Relabelling SS CMS
14
-     *
15
-     * @param array $modules
16
-     */
17
-    public function updateVersionModules(&$modules)
18
-    {
19
-        unset($modules['silverstripe/framework']);
20
-        $modules = ['cwp/cwp' => 'CWP'] + $modules;
21
-        $modules['silverstripe/cms'] = 'SilverStripe CMS';
22
-    }
9
+	/**
10
+	 * Updates the modules used for the version label by:
11
+	 *  - Removing SS Framework
12
+	 *  - Adding CWP
13
+	 *  - Relabelling SS CMS
14
+	 *
15
+	 * @param array $modules
16
+	 */
17
+	public function updateVersionModules(&$modules)
18
+	{
19
+		unset($modules['silverstripe/framework']);
20
+		$modules = ['cwp/cwp' => 'CWP'] + $modules;
21
+		$modules['silverstripe/cms'] = 'SilverStripe CMS';
22
+	}
23 23
 }
Please login to merge, or discard this patch.
tests/Report/CwpStatsReportTest.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -11,42 +11,42 @@
 block discarded – undo
11 11
 
12 12
 class CwpStatsReportTest extends SapphireTest
13 13
 {
14
-    protected static $fixture_file = 'CwpStatsReportTest.yml';
15
-
16
-    protected function setUp()
17
-    {
18
-        Config::modify()->set(SiteTree::class, 'create_default_pages', false);
19
-
20
-        parent::setUp();
21
-    }
22
-
23
-    public function testCount()
24
-    {
25
-        // Publish all pages apart from page3.
26
-        $this->objFromFixture(Page::class, 'page1')->publishRecursive();
27
-        $this->objFromFixture(Page::class, 'page2')->publishRecursive();
28
-        $this->objFromFixture(Page::class, 'page3')->publishRecursive();
29
-
30
-        // Add page5s to a subsite, if the module is installed.
31
-        $page5s = $this->objFromFixture(Page::class, 'page5s');
32
-        if (class_exists(Subsite::class)) {
33
-            $subsite = Subsite::create();
34
-            $subsite->Title = 'subsite';
35
-            $subsite->write();
36
-
37
-            $page5s->SubsiteID = $subsite->ID;
38
-            $page5s->write();
39
-        }
40
-        $page5s->publishRecursive();
41
-
42
-        $report = CwpStatsReport::create();
43
-        $records = $report->sourceRecords([])->toArray();
44
-        $i = 0;
45
-        $this->assertEquals($records[$i++]['Count'], 4, 'Four pages in total, across locales, subsites, live only.');
46
-        if (class_exists(Subsite::class)) {
47
-            $this->assertEquals($records[$i++]['Count'], 3, 'Three pages in the main site, if subsites installed.');
48
-            $this->assertEquals($records[$i++]['Count'], 1, 'One page in the subsite, if subsites installed');
49
-        }
50
-        $this->assertEquals($records[$i++]['Count'], 1, 'One file in total.');
51
-    }
14
+	protected static $fixture_file = 'CwpStatsReportTest.yml';
15
+
16
+	protected function setUp()
17
+	{
18
+		Config::modify()->set(SiteTree::class, 'create_default_pages', false);
19
+
20
+		parent::setUp();
21
+	}
22
+
23
+	public function testCount()
24
+	{
25
+		// Publish all pages apart from page3.
26
+		$this->objFromFixture(Page::class, 'page1')->publishRecursive();
27
+		$this->objFromFixture(Page::class, 'page2')->publishRecursive();
28
+		$this->objFromFixture(Page::class, 'page3')->publishRecursive();
29
+
30
+		// Add page5s to a subsite, if the module is installed.
31
+		$page5s = $this->objFromFixture(Page::class, 'page5s');
32
+		if (class_exists(Subsite::class)) {
33
+			$subsite = Subsite::create();
34
+			$subsite->Title = 'subsite';
35
+			$subsite->write();
36
+
37
+			$page5s->SubsiteID = $subsite->ID;
38
+			$page5s->write();
39
+		}
40
+		$page5s->publishRecursive();
41
+
42
+		$report = CwpStatsReport::create();
43
+		$records = $report->sourceRecords([])->toArray();
44
+		$i = 0;
45
+		$this->assertEquals($records[$i++]['Count'], 4, 'Four pages in total, across locales, subsites, live only.');
46
+		if (class_exists(Subsite::class)) {
47
+			$this->assertEquals($records[$i++]['Count'], 3, 'Three pages in the main site, if subsites installed.');
48
+			$this->assertEquals($records[$i++]['Count'], 1, 'One page in the subsite, if subsites installed');
49
+		}
50
+		$this->assertEquals($records[$i++]['Count'], 1, 'One file in total.');
51
+	}
52 52
 }
Please login to merge, or discard this patch.