Passed
Pull Request — master (#64)
by
unknown
06:06
created
Tests/Unit/Controller/DocumentControllerTest.php 2 patches
Indentation   +108 added lines, -108 removed lines patch added patch discarded remove patch
@@ -20,112 +20,112 @@
 block discarded – undo
20 20
  */
21 21
 class DocumentControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
22 22
 
23
-	/**
24
-	 * @var \EWW\Dpf\Controller\DocumentController
25
-	 */
26
-	protected $subject = NULL;
27
-
28
-	protected function setUp() {
29
-		$this->subject = $this->getMock('EWW\\Dpf\\Controller\\DocumentController', array('redirect', 'forward', 'addFlashMessage'), array(), '', FALSE);
30
-	}
31
-
32
-	protected function tearDown() {
33
-		unset($this->subject);
34
-	}
35
-
36
-	/**
37
-	 * @test
38
-	 */
39
-	public function listActionFetchesAllDocumentsFromRepositoryAndAssignsThemToView() {
40
-
41
-		$allDocuments = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array(), array(), '', FALSE);
42
-
43
-		$documentRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentRepository', array('findAll'), array(), '', FALSE);
44
-		$documentRepository->expects($this->once())->method('findAll')->will($this->returnValue($allDocuments));
45
-		$this->inject($this->subject, 'documentRepository', $documentRepository);
46
-
47
-		$view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
48
-		$view->expects($this->once())->method('assign')->with('documents', $allDocuments);
49
-		$this->inject($this->subject, 'view', $view);
50
-
51
-		$this->subject->listAction();
52
-	}
53
-
54
-	/**
55
-	 * @test
56
-	 */
57
-	public function showActionAssignsTheGivenDocumentToView() {
58
-		$document = new \EWW\Dpf\Domain\Model\Document();
59
-
60
-		$view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
61
-		$this->inject($this->subject, 'view', $view);
62
-		$view->expects($this->once())->method('assign')->with('document', $document);
63
-
64
-		$this->subject->showAction($document);
65
-	}
66
-
67
-	/**
68
-	 * @test
69
-	 */
70
-	public function newActionAssignsTheGivenDocumentToView() {
71
-		$document = new \EWW\Dpf\Domain\Model\Document();
72
-
73
-		$view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
74
-		$view->expects($this->once())->method('assign')->with('newDocument', $document);
75
-		$this->inject($this->subject, 'view', $view);
76
-
77
-		$this->subject->newAction($document);
78
-	}
79
-
80
-	/**
81
-	 * @test
82
-	 */
83
-	public function createActionAddsTheGivenDocumentToDocumentRepository() {
84
-		$document = new \EWW\Dpf\Domain\Model\Document();
85
-
86
-		$documentRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentRepository', array('add'), array(), '', FALSE);
87
-		$documentRepository->expects($this->once())->method('add')->with($document);
88
-		$this->inject($this->subject, 'documentRepository', $documentRepository);
89
-
90
-		$this->subject->createAction($document);
91
-	}
92
-
93
-	/**
94
-	 * @test
95
-	 */
96
-	public function editActionAssignsTheGivenDocumentToView() {
97
-		$document = new \EWW\Dpf\Domain\Model\Document();
98
-
99
-		$view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
100
-		$this->inject($this->subject, 'view', $view);
101
-		$view->expects($this->once())->method('assign')->with('document', $document);
102
-
103
-		$this->subject->editAction($document);
104
-	}
105
-
106
-	/**
107
-	 * @test
108
-	 */
109
-	public function updateActionUpdatesTheGivenDocumentInDocumentRepository() {
110
-		$document = new \EWW\Dpf\Domain\Model\Document();
111
-
112
-		$documentRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentRepository', array('update'), array(), '', FALSE);
113
-		$documentRepository->expects($this->once())->method('update')->with($document);
114
-		$this->inject($this->subject, 'documentRepository', $documentRepository);
115
-
116
-		$this->subject->updateAction($document);
117
-	}
118
-
119
-	/**
120
-	 * @test
121
-	 */
122
-	public function deleteActionRemovesTheGivenDocumentFromDocumentRepository() {
123
-		$document = new \EWW\Dpf\Domain\Model\Document();
124
-
125
-		$documentRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentRepository', array('remove'), array(), '', FALSE);
126
-		$documentRepository->expects($this->once())->method('remove')->with($document);
127
-		$this->inject($this->subject, 'documentRepository', $documentRepository);
128
-
129
-		$this->subject->deleteAction($document);
130
-	}
23
+    /**
24
+     * @var \EWW\Dpf\Controller\DocumentController
25
+     */
26
+    protected $subject = NULL;
27
+
28
+    protected function setUp() {
29
+        $this->subject = $this->getMock('EWW\\Dpf\\Controller\\DocumentController', array('redirect', 'forward', 'addFlashMessage'), array(), '', FALSE);
30
+    }
31
+
32
+    protected function tearDown() {
33
+        unset($this->subject);
34
+    }
35
+
36
+    /**
37
+     * @test
38
+     */
39
+    public function listActionFetchesAllDocumentsFromRepositoryAndAssignsThemToView() {
40
+
41
+        $allDocuments = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array(), array(), '', FALSE);
42
+
43
+        $documentRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentRepository', array('findAll'), array(), '', FALSE);
44
+        $documentRepository->expects($this->once())->method('findAll')->will($this->returnValue($allDocuments));
45
+        $this->inject($this->subject, 'documentRepository', $documentRepository);
46
+
47
+        $view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
48
+        $view->expects($this->once())->method('assign')->with('documents', $allDocuments);
49
+        $this->inject($this->subject, 'view', $view);
50
+
51
+        $this->subject->listAction();
52
+    }
53
+
54
+    /**
55
+     * @test
56
+     */
57
+    public function showActionAssignsTheGivenDocumentToView() {
58
+        $document = new \EWW\Dpf\Domain\Model\Document();
59
+
60
+        $view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
61
+        $this->inject($this->subject, 'view', $view);
62
+        $view->expects($this->once())->method('assign')->with('document', $document);
63
+
64
+        $this->subject->showAction($document);
65
+    }
66
+
67
+    /**
68
+     * @test
69
+     */
70
+    public function newActionAssignsTheGivenDocumentToView() {
71
+        $document = new \EWW\Dpf\Domain\Model\Document();
72
+
73
+        $view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
74
+        $view->expects($this->once())->method('assign')->with('newDocument', $document);
75
+        $this->inject($this->subject, 'view', $view);
76
+
77
+        $this->subject->newAction($document);
78
+    }
79
+
80
+    /**
81
+     * @test
82
+     */
83
+    public function createActionAddsTheGivenDocumentToDocumentRepository() {
84
+        $document = new \EWW\Dpf\Domain\Model\Document();
85
+
86
+        $documentRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentRepository', array('add'), array(), '', FALSE);
87
+        $documentRepository->expects($this->once())->method('add')->with($document);
88
+        $this->inject($this->subject, 'documentRepository', $documentRepository);
89
+
90
+        $this->subject->createAction($document);
91
+    }
92
+
93
+    /**
94
+     * @test
95
+     */
96
+    public function editActionAssignsTheGivenDocumentToView() {
97
+        $document = new \EWW\Dpf\Domain\Model\Document();
98
+
99
+        $view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
100
+        $this->inject($this->subject, 'view', $view);
101
+        $view->expects($this->once())->method('assign')->with('document', $document);
102
+
103
+        $this->subject->editAction($document);
104
+    }
105
+
106
+    /**
107
+     * @test
108
+     */
109
+    public function updateActionUpdatesTheGivenDocumentInDocumentRepository() {
110
+        $document = new \EWW\Dpf\Domain\Model\Document();
111
+
112
+        $documentRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentRepository', array('update'), array(), '', FALSE);
113
+        $documentRepository->expects($this->once())->method('update')->with($document);
114
+        $this->inject($this->subject, 'documentRepository', $documentRepository);
115
+
116
+        $this->subject->updateAction($document);
117
+    }
118
+
119
+    /**
120
+     * @test
121
+     */
122
+    public function deleteActionRemovesTheGivenDocumentFromDocumentRepository() {
123
+        $document = new \EWW\Dpf\Domain\Model\Document();
124
+
125
+        $documentRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentRepository', array('remove'), array(), '', FALSE);
126
+        $documentRepository->expects($this->once())->method('remove')->with($document);
127
+        $this->inject($this->subject, 'documentRepository', $documentRepository);
128
+
129
+        $this->subject->deleteAction($document);
130
+    }
131 131
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	protected $subject = NULL;
27 27
 
28 28
 	protected function setUp() {
29
-		$this->subject = $this->getMock('EWW\\Dpf\\Controller\\DocumentController', array('redirect', 'forward', 'addFlashMessage'), array(), '', FALSE);
29
+		$this->subject = $this->getMock('EWW\\Dpf\\Controller\\DocumentController', array ('redirect', 'forward', 'addFlashMessage'), array (), '', FALSE);
30 30
 	}
31 31
 
32 32
 	protected function tearDown() {
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
 	 */
39 39
 	public function listActionFetchesAllDocumentsFromRepositoryAndAssignsThemToView() {
40 40
 
41
-		$allDocuments = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array(), array(), '', FALSE);
41
+		$allDocuments = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array (), array (), '', FALSE);
42 42
 
43
-		$documentRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentRepository', array('findAll'), array(), '', FALSE);
43
+		$documentRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentRepository', array ('findAll'), array (), '', FALSE);
44 44
 		$documentRepository->expects($this->once())->method('findAll')->will($this->returnValue($allDocuments));
45 45
 		$this->inject($this->subject, 'documentRepository', $documentRepository);
46 46
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	public function createActionAddsTheGivenDocumentToDocumentRepository() {
84 84
 		$document = new \EWW\Dpf\Domain\Model\Document();
85 85
 
86
-		$documentRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentRepository', array('add'), array(), '', FALSE);
86
+		$documentRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentRepository', array ('add'), array (), '', FALSE);
87 87
 		$documentRepository->expects($this->once())->method('add')->with($document);
88 88
 		$this->inject($this->subject, 'documentRepository', $documentRepository);
89 89
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	public function updateActionUpdatesTheGivenDocumentInDocumentRepository() {
110 110
 		$document = new \EWW\Dpf\Domain\Model\Document();
111 111
 
112
-		$documentRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentRepository', array('update'), array(), '', FALSE);
112
+		$documentRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentRepository', array ('update'), array (), '', FALSE);
113 113
 		$documentRepository->expects($this->once())->method('update')->with($document);
114 114
 		$this->inject($this->subject, 'documentRepository', $documentRepository);
115 115
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	public function deleteActionRemovesTheGivenDocumentFromDocumentRepository() {
123 123
 		$document = new \EWW\Dpf\Domain\Model\Document();
124 124
 
125
-		$documentRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentRepository', array('remove'), array(), '', FALSE);
125
+		$documentRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentRepository', array ('remove'), array (), '', FALSE);
126 126
 		$documentRepository->expects($this->once())->method('remove')->with($document);
127 127
 		$this->inject($this->subject, 'documentRepository', $documentRepository);
128 128
 
Please login to merge, or discard this patch.
Tests/Unit/Controller/DocumentsControllerTest.php 2 patches
Indentation   +108 added lines, -108 removed lines patch added patch discarded remove patch
@@ -20,112 +20,112 @@
 block discarded – undo
20 20
  */
21 21
 class DocumentsControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
22 22
 
23
-	/**
24
-	 * @var \EWW\Dpf\Controller\DocumentsController
25
-	 */
26
-	protected $subject = NULL;
27
-
28
-	protected function setUp() {
29
-		$this->subject = $this->getMock('EWW\\Dpf\\Controller\\DocumentsController', array('redirect', 'forward', 'addFlashMessage'), array(), '', FALSE);
30
-	}
31
-
32
-	protected function tearDown() {
33
-		unset($this->subject);
34
-	}
35
-
36
-	/**
37
-	 * @test
38
-	 */
39
-	public function listActionFetchesAllDocumentssFromRepositoryAndAssignsThemToView() {
40
-
41
-		$allDocumentss = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array(), array(), '', FALSE);
42
-
43
-		$documentsRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentsRepository', array('findAll'), array(), '', FALSE);
44
-		$documentsRepository->expects($this->once())->method('findAll')->will($this->returnValue($allDocumentss));
45
-		$this->inject($this->subject, 'documentsRepository', $documentsRepository);
46
-
47
-		$view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
48
-		$view->expects($this->once())->method('assign')->with('documentss', $allDocumentss);
49
-		$this->inject($this->subject, 'view', $view);
50
-
51
-		$this->subject->listAction();
52
-	}
53
-
54
-	/**
55
-	 * @test
56
-	 */
57
-	public function showActionAssignsTheGivenDocumentsToView() {
58
-		$documents = new \EWW\Dpf\Domain\Model\Documents();
59
-
60
-		$view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
61
-		$this->inject($this->subject, 'view', $view);
62
-		$view->expects($this->once())->method('assign')->with('documents', $documents);
63
-
64
-		$this->subject->showAction($documents);
65
-	}
66
-
67
-	/**
68
-	 * @test
69
-	 */
70
-	public function newActionAssignsTheGivenDocumentsToView() {
71
-		$documents = new \EWW\Dpf\Domain\Model\Documents();
72
-
73
-		$view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
74
-		$view->expects($this->once())->method('assign')->with('newDocuments', $documents);
75
-		$this->inject($this->subject, 'view', $view);
76
-
77
-		$this->subject->newAction($documents);
78
-	}
79
-
80
-	/**
81
-	 * @test
82
-	 */
83
-	public function createActionAddsTheGivenDocumentsToDocumentsRepository() {
84
-		$documents = new \EWW\Dpf\Domain\Model\Documents();
85
-
86
-		$documentsRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentsRepository', array('add'), array(), '', FALSE);
87
-		$documentsRepository->expects($this->once())->method('add')->with($documents);
88
-		$this->inject($this->subject, 'documentsRepository', $documentsRepository);
89
-
90
-		$this->subject->createAction($documents);
91
-	}
92
-
93
-	/**
94
-	 * @test
95
-	 */
96
-	public function editActionAssignsTheGivenDocumentsToView() {
97
-		$documents = new \EWW\Dpf\Domain\Model\Documents();
98
-
99
-		$view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
100
-		$this->inject($this->subject, 'view', $view);
101
-		$view->expects($this->once())->method('assign')->with('documents', $documents);
102
-
103
-		$this->subject->editAction($documents);
104
-	}
105
-
106
-	/**
107
-	 * @test
108
-	 */
109
-	public function updateActionUpdatesTheGivenDocumentsInDocumentsRepository() {
110
-		$documents = new \EWW\Dpf\Domain\Model\Documents();
111
-
112
-		$documentsRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentsRepository', array('update'), array(), '', FALSE);
113
-		$documentsRepository->expects($this->once())->method('update')->with($documents);
114
-		$this->inject($this->subject, 'documentsRepository', $documentsRepository);
115
-
116
-		$this->subject->updateAction($documents);
117
-	}
118
-
119
-	/**
120
-	 * @test
121
-	 */
122
-	public function deleteActionRemovesTheGivenDocumentsFromDocumentsRepository() {
123
-		$documents = new \EWW\Dpf\Domain\Model\Documents();
124
-
125
-		$documentsRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentsRepository', array('remove'), array(), '', FALSE);
126
-		$documentsRepository->expects($this->once())->method('remove')->with($documents);
127
-		$this->inject($this->subject, 'documentsRepository', $documentsRepository);
128
-
129
-		$this->subject->deleteAction($documents);
130
-	}
23
+    /**
24
+     * @var \EWW\Dpf\Controller\DocumentsController
25
+     */
26
+    protected $subject = NULL;
27
+
28
+    protected function setUp() {
29
+        $this->subject = $this->getMock('EWW\\Dpf\\Controller\\DocumentsController', array('redirect', 'forward', 'addFlashMessage'), array(), '', FALSE);
30
+    }
31
+
32
+    protected function tearDown() {
33
+        unset($this->subject);
34
+    }
35
+
36
+    /**
37
+     * @test
38
+     */
39
+    public function listActionFetchesAllDocumentssFromRepositoryAndAssignsThemToView() {
40
+
41
+        $allDocumentss = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array(), array(), '', FALSE);
42
+
43
+        $documentsRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentsRepository', array('findAll'), array(), '', FALSE);
44
+        $documentsRepository->expects($this->once())->method('findAll')->will($this->returnValue($allDocumentss));
45
+        $this->inject($this->subject, 'documentsRepository', $documentsRepository);
46
+
47
+        $view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
48
+        $view->expects($this->once())->method('assign')->with('documentss', $allDocumentss);
49
+        $this->inject($this->subject, 'view', $view);
50
+
51
+        $this->subject->listAction();
52
+    }
53
+
54
+    /**
55
+     * @test
56
+     */
57
+    public function showActionAssignsTheGivenDocumentsToView() {
58
+        $documents = new \EWW\Dpf\Domain\Model\Documents();
59
+
60
+        $view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
61
+        $this->inject($this->subject, 'view', $view);
62
+        $view->expects($this->once())->method('assign')->with('documents', $documents);
63
+
64
+        $this->subject->showAction($documents);
65
+    }
66
+
67
+    /**
68
+     * @test
69
+     */
70
+    public function newActionAssignsTheGivenDocumentsToView() {
71
+        $documents = new \EWW\Dpf\Domain\Model\Documents();
72
+
73
+        $view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
74
+        $view->expects($this->once())->method('assign')->with('newDocuments', $documents);
75
+        $this->inject($this->subject, 'view', $view);
76
+
77
+        $this->subject->newAction($documents);
78
+    }
79
+
80
+    /**
81
+     * @test
82
+     */
83
+    public function createActionAddsTheGivenDocumentsToDocumentsRepository() {
84
+        $documents = new \EWW\Dpf\Domain\Model\Documents();
85
+
86
+        $documentsRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentsRepository', array('add'), array(), '', FALSE);
87
+        $documentsRepository->expects($this->once())->method('add')->with($documents);
88
+        $this->inject($this->subject, 'documentsRepository', $documentsRepository);
89
+
90
+        $this->subject->createAction($documents);
91
+    }
92
+
93
+    /**
94
+     * @test
95
+     */
96
+    public function editActionAssignsTheGivenDocumentsToView() {
97
+        $documents = new \EWW\Dpf\Domain\Model\Documents();
98
+
99
+        $view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
100
+        $this->inject($this->subject, 'view', $view);
101
+        $view->expects($this->once())->method('assign')->with('documents', $documents);
102
+
103
+        $this->subject->editAction($documents);
104
+    }
105
+
106
+    /**
107
+     * @test
108
+     */
109
+    public function updateActionUpdatesTheGivenDocumentsInDocumentsRepository() {
110
+        $documents = new \EWW\Dpf\Domain\Model\Documents();
111
+
112
+        $documentsRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentsRepository', array('update'), array(), '', FALSE);
113
+        $documentsRepository->expects($this->once())->method('update')->with($documents);
114
+        $this->inject($this->subject, 'documentsRepository', $documentsRepository);
115
+
116
+        $this->subject->updateAction($documents);
117
+    }
118
+
119
+    /**
120
+     * @test
121
+     */
122
+    public function deleteActionRemovesTheGivenDocumentsFromDocumentsRepository() {
123
+        $documents = new \EWW\Dpf\Domain\Model\Documents();
124
+
125
+        $documentsRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentsRepository', array('remove'), array(), '', FALSE);
126
+        $documentsRepository->expects($this->once())->method('remove')->with($documents);
127
+        $this->inject($this->subject, 'documentsRepository', $documentsRepository);
128
+
129
+        $this->subject->deleteAction($documents);
130
+    }
131 131
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	protected $subject = NULL;
27 27
 
28 28
 	protected function setUp() {
29
-		$this->subject = $this->getMock('EWW\\Dpf\\Controller\\DocumentsController', array('redirect', 'forward', 'addFlashMessage'), array(), '', FALSE);
29
+		$this->subject = $this->getMock('EWW\\Dpf\\Controller\\DocumentsController', array ('redirect', 'forward', 'addFlashMessage'), array (), '', FALSE);
30 30
 	}
31 31
 
32 32
 	protected function tearDown() {
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
 	 */
39 39
 	public function listActionFetchesAllDocumentssFromRepositoryAndAssignsThemToView() {
40 40
 
41
-		$allDocumentss = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array(), array(), '', FALSE);
41
+		$allDocumentss = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array (), array (), '', FALSE);
42 42
 
43
-		$documentsRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentsRepository', array('findAll'), array(), '', FALSE);
43
+		$documentsRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentsRepository', array ('findAll'), array (), '', FALSE);
44 44
 		$documentsRepository->expects($this->once())->method('findAll')->will($this->returnValue($allDocumentss));
45 45
 		$this->inject($this->subject, 'documentsRepository', $documentsRepository);
46 46
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	public function createActionAddsTheGivenDocumentsToDocumentsRepository() {
84 84
 		$documents = new \EWW\Dpf\Domain\Model\Documents();
85 85
 
86
-		$documentsRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentsRepository', array('add'), array(), '', FALSE);
86
+		$documentsRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentsRepository', array ('add'), array (), '', FALSE);
87 87
 		$documentsRepository->expects($this->once())->method('add')->with($documents);
88 88
 		$this->inject($this->subject, 'documentsRepository', $documentsRepository);
89 89
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	public function updateActionUpdatesTheGivenDocumentsInDocumentsRepository() {
110 110
 		$documents = new \EWW\Dpf\Domain\Model\Documents();
111 111
 
112
-		$documentsRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentsRepository', array('update'), array(), '', FALSE);
112
+		$documentsRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentsRepository', array ('update'), array (), '', FALSE);
113 113
 		$documentsRepository->expects($this->once())->method('update')->with($documents);
114 114
 		$this->inject($this->subject, 'documentsRepository', $documentsRepository);
115 115
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	public function deleteActionRemovesTheGivenDocumentsFromDocumentsRepository() {
123 123
 		$documents = new \EWW\Dpf\Domain\Model\Documents();
124 124
 
125
-		$documentsRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentsRepository', array('remove'), array(), '', FALSE);
125
+		$documentsRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentsRepository', array ('remove'), array (), '', FALSE);
126 126
 		$documentsRepository->expects($this->once())->method('remove')->with($documents);
127 127
 		$this->inject($this->subject, 'documentsRepository', $documentsRepository);
128 128
 
Please login to merge, or discard this patch.
Tests/Unit/Controller/DocumentTypeControllerTest.php 2 patches
Indentation   +108 added lines, -108 removed lines patch added patch discarded remove patch
@@ -20,112 +20,112 @@
 block discarded – undo
20 20
  */
21 21
 class DocumentTypeControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
22 22
 
23
-	/**
24
-	 * @var \EWW\Dpf\Controller\DocumentTypeController
25
-	 */
26
-	protected $subject = NULL;
27
-
28
-	protected function setUp() {
29
-		$this->subject = $this->getMock('EWW\\Dpf\\Controller\\DocumentTypeController', array('redirect', 'forward', 'addFlashMessage'), array(), '', FALSE);
30
-	}
31
-
32
-	protected function tearDown() {
33
-		unset($this->subject);
34
-	}
35
-
36
-	/**
37
-	 * @test
38
-	 */
39
-	public function listActionFetchesAllDocumentTypesFromRepositoryAndAssignsThemToView() {
40
-
41
-		$allDocumentTypes = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array(), array(), '', FALSE);
42
-
43
-		$documentTypeRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentTypeRepository', array('findAll'), array(), '', FALSE);
44
-		$documentTypeRepository->expects($this->once())->method('findAll')->will($this->returnValue($allDocumentTypes));
45
-		$this->inject($this->subject, 'documentTypeRepository', $documentTypeRepository);
46
-
47
-		$view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
48
-		$view->expects($this->once())->method('assign')->with('documentTypes', $allDocumentTypes);
49
-		$this->inject($this->subject, 'view', $view);
50
-
51
-		$this->subject->listAction();
52
-	}
53
-
54
-	/**
55
-	 * @test
56
-	 */
57
-	public function showActionAssignsTheGivenDocumentTypeToView() {
58
-		$documentType = new \EWW\Dpf\Domain\Model\DocumentType();
59
-
60
-		$view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
61
-		$this->inject($this->subject, 'view', $view);
62
-		$view->expects($this->once())->method('assign')->with('documentType', $documentType);
63
-
64
-		$this->subject->showAction($documentType);
65
-	}
66
-
67
-	/**
68
-	 * @test
69
-	 */
70
-	public function newActionAssignsTheGivenDocumentTypeToView() {
71
-		$documentType = new \EWW\Dpf\Domain\Model\DocumentType();
72
-
73
-		$view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
74
-		$view->expects($this->once())->method('assign')->with('newDocumentType', $documentType);
75
-		$this->inject($this->subject, 'view', $view);
76
-
77
-		$this->subject->newAction($documentType);
78
-	}
79
-
80
-	/**
81
-	 * @test
82
-	 */
83
-	public function createActionAddsTheGivenDocumentTypeToDocumentTypeRepository() {
84
-		$documentType = new \EWW\Dpf\Domain\Model\DocumentType();
85
-
86
-		$documentTypeRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentTypeRepository', array('add'), array(), '', FALSE);
87
-		$documentTypeRepository->expects($this->once())->method('add')->with($documentType);
88
-		$this->inject($this->subject, 'documentTypeRepository', $documentTypeRepository);
89
-
90
-		$this->subject->createAction($documentType);
91
-	}
92
-
93
-	/**
94
-	 * @test
95
-	 */
96
-	public function editActionAssignsTheGivenDocumentTypeToView() {
97
-		$documentType = new \EWW\Dpf\Domain\Model\DocumentType();
98
-
99
-		$view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
100
-		$this->inject($this->subject, 'view', $view);
101
-		$view->expects($this->once())->method('assign')->with('documentType', $documentType);
102
-
103
-		$this->subject->editAction($documentType);
104
-	}
105
-
106
-	/**
107
-	 * @test
108
-	 */
109
-	public function updateActionUpdatesTheGivenDocumentTypeInDocumentTypeRepository() {
110
-		$documentType = new \EWW\Dpf\Domain\Model\DocumentType();
111
-
112
-		$documentTypeRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentTypeRepository', array('update'), array(), '', FALSE);
113
-		$documentTypeRepository->expects($this->once())->method('update')->with($documentType);
114
-		$this->inject($this->subject, 'documentTypeRepository', $documentTypeRepository);
115
-
116
-		$this->subject->updateAction($documentType);
117
-	}
118
-
119
-	/**
120
-	 * @test
121
-	 */
122
-	public function deleteActionRemovesTheGivenDocumentTypeFromDocumentTypeRepository() {
123
-		$documentType = new \EWW\Dpf\Domain\Model\DocumentType();
124
-
125
-		$documentTypeRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentTypeRepository', array('remove'), array(), '', FALSE);
126
-		$documentTypeRepository->expects($this->once())->method('remove')->with($documentType);
127
-		$this->inject($this->subject, 'documentTypeRepository', $documentTypeRepository);
128
-
129
-		$this->subject->deleteAction($documentType);
130
-	}
23
+    /**
24
+     * @var \EWW\Dpf\Controller\DocumentTypeController
25
+     */
26
+    protected $subject = NULL;
27
+
28
+    protected function setUp() {
29
+        $this->subject = $this->getMock('EWW\\Dpf\\Controller\\DocumentTypeController', array('redirect', 'forward', 'addFlashMessage'), array(), '', FALSE);
30
+    }
31
+
32
+    protected function tearDown() {
33
+        unset($this->subject);
34
+    }
35
+
36
+    /**
37
+     * @test
38
+     */
39
+    public function listActionFetchesAllDocumentTypesFromRepositoryAndAssignsThemToView() {
40
+
41
+        $allDocumentTypes = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array(), array(), '', FALSE);
42
+
43
+        $documentTypeRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentTypeRepository', array('findAll'), array(), '', FALSE);
44
+        $documentTypeRepository->expects($this->once())->method('findAll')->will($this->returnValue($allDocumentTypes));
45
+        $this->inject($this->subject, 'documentTypeRepository', $documentTypeRepository);
46
+
47
+        $view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
48
+        $view->expects($this->once())->method('assign')->with('documentTypes', $allDocumentTypes);
49
+        $this->inject($this->subject, 'view', $view);
50
+
51
+        $this->subject->listAction();
52
+    }
53
+
54
+    /**
55
+     * @test
56
+     */
57
+    public function showActionAssignsTheGivenDocumentTypeToView() {
58
+        $documentType = new \EWW\Dpf\Domain\Model\DocumentType();
59
+
60
+        $view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
61
+        $this->inject($this->subject, 'view', $view);
62
+        $view->expects($this->once())->method('assign')->with('documentType', $documentType);
63
+
64
+        $this->subject->showAction($documentType);
65
+    }
66
+
67
+    /**
68
+     * @test
69
+     */
70
+    public function newActionAssignsTheGivenDocumentTypeToView() {
71
+        $documentType = new \EWW\Dpf\Domain\Model\DocumentType();
72
+
73
+        $view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
74
+        $view->expects($this->once())->method('assign')->with('newDocumentType', $documentType);
75
+        $this->inject($this->subject, 'view', $view);
76
+
77
+        $this->subject->newAction($documentType);
78
+    }
79
+
80
+    /**
81
+     * @test
82
+     */
83
+    public function createActionAddsTheGivenDocumentTypeToDocumentTypeRepository() {
84
+        $documentType = new \EWW\Dpf\Domain\Model\DocumentType();
85
+
86
+        $documentTypeRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentTypeRepository', array('add'), array(), '', FALSE);
87
+        $documentTypeRepository->expects($this->once())->method('add')->with($documentType);
88
+        $this->inject($this->subject, 'documentTypeRepository', $documentTypeRepository);
89
+
90
+        $this->subject->createAction($documentType);
91
+    }
92
+
93
+    /**
94
+     * @test
95
+     */
96
+    public function editActionAssignsTheGivenDocumentTypeToView() {
97
+        $documentType = new \EWW\Dpf\Domain\Model\DocumentType();
98
+
99
+        $view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface');
100
+        $this->inject($this->subject, 'view', $view);
101
+        $view->expects($this->once())->method('assign')->with('documentType', $documentType);
102
+
103
+        $this->subject->editAction($documentType);
104
+    }
105
+
106
+    /**
107
+     * @test
108
+     */
109
+    public function updateActionUpdatesTheGivenDocumentTypeInDocumentTypeRepository() {
110
+        $documentType = new \EWW\Dpf\Domain\Model\DocumentType();
111
+
112
+        $documentTypeRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentTypeRepository', array('update'), array(), '', FALSE);
113
+        $documentTypeRepository->expects($this->once())->method('update')->with($documentType);
114
+        $this->inject($this->subject, 'documentTypeRepository', $documentTypeRepository);
115
+
116
+        $this->subject->updateAction($documentType);
117
+    }
118
+
119
+    /**
120
+     * @test
121
+     */
122
+    public function deleteActionRemovesTheGivenDocumentTypeFromDocumentTypeRepository() {
123
+        $documentType = new \EWW\Dpf\Domain\Model\DocumentType();
124
+
125
+        $documentTypeRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentTypeRepository', array('remove'), array(), '', FALSE);
126
+        $documentTypeRepository->expects($this->once())->method('remove')->with($documentType);
127
+        $this->inject($this->subject, 'documentTypeRepository', $documentTypeRepository);
128
+
129
+        $this->subject->deleteAction($documentType);
130
+    }
131 131
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	protected $subject = NULL;
27 27
 
28 28
 	protected function setUp() {
29
-		$this->subject = $this->getMock('EWW\\Dpf\\Controller\\DocumentTypeController', array('redirect', 'forward', 'addFlashMessage'), array(), '', FALSE);
29
+		$this->subject = $this->getMock('EWW\\Dpf\\Controller\\DocumentTypeController', array ('redirect', 'forward', 'addFlashMessage'), array (), '', FALSE);
30 30
 	}
31 31
 
32 32
 	protected function tearDown() {
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
 	 */
39 39
 	public function listActionFetchesAllDocumentTypesFromRepositoryAndAssignsThemToView() {
40 40
 
41
-		$allDocumentTypes = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array(), array(), '', FALSE);
41
+		$allDocumentTypes = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array (), array (), '', FALSE);
42 42
 
43
-		$documentTypeRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentTypeRepository', array('findAll'), array(), '', FALSE);
43
+		$documentTypeRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentTypeRepository', array ('findAll'), array (), '', FALSE);
44 44
 		$documentTypeRepository->expects($this->once())->method('findAll')->will($this->returnValue($allDocumentTypes));
45 45
 		$this->inject($this->subject, 'documentTypeRepository', $documentTypeRepository);
46 46
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	public function createActionAddsTheGivenDocumentTypeToDocumentTypeRepository() {
84 84
 		$documentType = new \EWW\Dpf\Domain\Model\DocumentType();
85 85
 
86
-		$documentTypeRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentTypeRepository', array('add'), array(), '', FALSE);
86
+		$documentTypeRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentTypeRepository', array ('add'), array (), '', FALSE);
87 87
 		$documentTypeRepository->expects($this->once())->method('add')->with($documentType);
88 88
 		$this->inject($this->subject, 'documentTypeRepository', $documentTypeRepository);
89 89
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	public function updateActionUpdatesTheGivenDocumentTypeInDocumentTypeRepository() {
110 110
 		$documentType = new \EWW\Dpf\Domain\Model\DocumentType();
111 111
 
112
-		$documentTypeRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentTypeRepository', array('update'), array(), '', FALSE);
112
+		$documentTypeRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentTypeRepository', array ('update'), array (), '', FALSE);
113 113
 		$documentTypeRepository->expects($this->once())->method('update')->with($documentType);
114 114
 		$this->inject($this->subject, 'documentTypeRepository', $documentTypeRepository);
115 115
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	public function deleteActionRemovesTheGivenDocumentTypeFromDocumentTypeRepository() {
123 123
 		$documentType = new \EWW\Dpf\Domain\Model\DocumentType();
124 124
 
125
-		$documentTypeRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentTypeRepository', array('remove'), array(), '', FALSE);
125
+		$documentTypeRepository = $this->getMock('EWW\\Dpf\\Domain\\Repository\\DocumentTypeRepository', array ('remove'), array (), '', FALSE);
126 126
 		$documentTypeRepository->expects($this->once())->method('remove')->with($documentType);
127 127
 		$this->inject($this->subject, 'documentTypeRepository', $documentTypeRepository);
128 128
 
Please login to merge, or discard this patch.
Tests/Unit/Domain/Model/MetadataGroupTest.php 2 patches
Indentation   +156 added lines, -156 removed lines patch added patch discarded remove patch
@@ -23,160 +23,160 @@
 block discarded – undo
23 23
  *
24 24
  */
25 25
 class MetadataGroupTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
26
-	/**
27
-	 * @var \EWW\Dpf\Domain\Model\MetadataGroup
28
-	 */
29
-	protected $subject = NULL;
30
-
31
-	protected function setUp() {
32
-		$this->subject = new \EWW\Dpf\Domain\Model\MetadataGroup();
33
-	}
34
-
35
-	protected function tearDown() {
36
-		unset($this->subject);
37
-	}
38
-
39
-	/**
40
-	 * @test
41
-	 */
42
-	public function getNameReturnsInitialValueForString() {
43
-		$this->assertSame(
44
-			'',
45
-			$this->subject->getName()
46
-		);
47
-	}
48
-
49
-	/**
50
-	 * @test
51
-	 */
52
-	public function setNameForStringSetsName() {
53
-		$this->subject->setName('Conceived at T3CON10');
54
-
55
-		$this->assertAttributeEquals(
56
-			'Conceived at T3CON10',
57
-			'name',
58
-			$this->subject
59
-		);
60
-	}
61
-
62
-	/**
63
-	 * @test
64
-	 */
65
-	public function getDisplayNameReturnsInitialValueForString() {
66
-		$this->assertSame(
67
-			'',
68
-			$this->subject->getDisplayName()
69
-		);
70
-	}
71
-
72
-	/**
73
-	 * @test
74
-	 */
75
-	public function setDisplayNameForStringSetsDisplayName() {
76
-		$this->subject->setDisplayName('Conceived at T3CON10');
77
-
78
-		$this->assertAttributeEquals(
79
-			'Conceived at T3CON10',
80
-			'displayName',
81
-			$this->subject
82
-		);
83
-	}
84
-
85
-	/**
86
-	 * @test
87
-	 */
88
-	public function getMandatoryReturnsInitialValueForBoolean() {
89
-		$this->assertSame(
90
-			FALSE,
91
-			$this->subject->getMandatory()
92
-		);
93
-	}
94
-
95
-	/**
96
-	 * @test
97
-	 */
98
-	public function setMandatoryForBooleanSetsMandatory() {
99
-		$this->subject->setMandatory(TRUE);
100
-
101
-		$this->assertAttributeEquals(
102
-			TRUE,
103
-			'mandatory',
104
-			$this->subject
105
-		);
106
-	}
107
-
108
-	/**
109
-	 * @test
110
-	 */
111
-	public function getMaxIterationReturnsInitialValueForInteger() {
112
-		$this->assertSame(
113
-			0,
114
-			$this->subject->getMaxIteration()
115
-		);
116
-	}
117
-
118
-	/**
119
-	 * @test
120
-	 */
121
-	public function setMaxIterationForIntegerSetsMaxIteration() {
122
-		$this->subject->setMaxIteration(12);
123
-
124
-		$this->assertAttributeEquals(
125
-			12,
126
-			'maxIteration',
127
-			$this->subject
128
-		);
129
-	}
130
-
131
-	/**
132
-	 * @test
133
-	 */
134
-	public function getMetadataObjectReturnsInitialValueForMetadataObject() {
135
-		$newObjectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
136
-		$this->assertEquals(
137
-			$newObjectStorage,
138
-			$this->subject->getMetadataObject()
139
-		);
140
-	}
141
-
142
-	/**
143
-	 * @test
144
-	 */
145
-	public function setMetadataObjectForObjectStorageContainingMetadataObjectSetsMetadataObject() {
146
-		$metadataObject = new \EWW\Dpf\Domain\Model\MetadataObject();
147
-		$objectStorageHoldingExactlyOneMetadataObject = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
148
-		$objectStorageHoldingExactlyOneMetadataObject->attach($metadataObject);
149
-		$this->subject->setMetadataObject($objectStorageHoldingExactlyOneMetadataObject);
150
-
151
-		$this->assertAttributeEquals(
152
-			$objectStorageHoldingExactlyOneMetadataObject,
153
-			'metadataObject',
154
-			$this->subject
155
-		);
156
-	}
157
-
158
-	/**
159
-	 * @test
160
-	 */
161
-	public function addMetadataObjectToObjectStorageHoldingMetadataObject() {
162
-		$metadataObject = new \EWW\Dpf\Domain\Model\MetadataObject();
163
-		$metadataObjectObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('attach'), array(), '', FALSE);
164
-		$metadataObjectObjectStorageMock->expects($this->once())->method('attach')->with($this->equalTo($metadataObject));
165
-		$this->inject($this->subject, 'metadataObject', $metadataObjectObjectStorageMock);
166
-
167
-		$this->subject->addMetadataObject($metadataObject);
168
-	}
169
-
170
-	/**
171
-	 * @test
172
-	 */
173
-	public function removeMetadataObjectFromObjectStorageHoldingMetadataObject() {
174
-		$metadataObject = new \EWW\Dpf\Domain\Model\MetadataObject();
175
-		$metadataObjectObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('detach'), array(), '', FALSE);
176
-		$metadataObjectObjectStorageMock->expects($this->once())->method('detach')->with($this->equalTo($metadataObject));
177
-		$this->inject($this->subject, 'metadataObject', $metadataObjectObjectStorageMock);
178
-
179
-		$this->subject->removeMetadataObject($metadataObject);
180
-
181
-	}
26
+    /**
27
+     * @var \EWW\Dpf\Domain\Model\MetadataGroup
28
+     */
29
+    protected $subject = NULL;
30
+
31
+    protected function setUp() {
32
+        $this->subject = new \EWW\Dpf\Domain\Model\MetadataGroup();
33
+    }
34
+
35
+    protected function tearDown() {
36
+        unset($this->subject);
37
+    }
38
+
39
+    /**
40
+     * @test
41
+     */
42
+    public function getNameReturnsInitialValueForString() {
43
+        $this->assertSame(
44
+            '',
45
+            $this->subject->getName()
46
+        );
47
+    }
48
+
49
+    /**
50
+     * @test
51
+     */
52
+    public function setNameForStringSetsName() {
53
+        $this->subject->setName('Conceived at T3CON10');
54
+
55
+        $this->assertAttributeEquals(
56
+            'Conceived at T3CON10',
57
+            'name',
58
+            $this->subject
59
+        );
60
+    }
61
+
62
+    /**
63
+     * @test
64
+     */
65
+    public function getDisplayNameReturnsInitialValueForString() {
66
+        $this->assertSame(
67
+            '',
68
+            $this->subject->getDisplayName()
69
+        );
70
+    }
71
+
72
+    /**
73
+     * @test
74
+     */
75
+    public function setDisplayNameForStringSetsDisplayName() {
76
+        $this->subject->setDisplayName('Conceived at T3CON10');
77
+
78
+        $this->assertAttributeEquals(
79
+            'Conceived at T3CON10',
80
+            'displayName',
81
+            $this->subject
82
+        );
83
+    }
84
+
85
+    /**
86
+     * @test
87
+     */
88
+    public function getMandatoryReturnsInitialValueForBoolean() {
89
+        $this->assertSame(
90
+            FALSE,
91
+            $this->subject->getMandatory()
92
+        );
93
+    }
94
+
95
+    /**
96
+     * @test
97
+     */
98
+    public function setMandatoryForBooleanSetsMandatory() {
99
+        $this->subject->setMandatory(TRUE);
100
+
101
+        $this->assertAttributeEquals(
102
+            TRUE,
103
+            'mandatory',
104
+            $this->subject
105
+        );
106
+    }
107
+
108
+    /**
109
+     * @test
110
+     */
111
+    public function getMaxIterationReturnsInitialValueForInteger() {
112
+        $this->assertSame(
113
+            0,
114
+            $this->subject->getMaxIteration()
115
+        );
116
+    }
117
+
118
+    /**
119
+     * @test
120
+     */
121
+    public function setMaxIterationForIntegerSetsMaxIteration() {
122
+        $this->subject->setMaxIteration(12);
123
+
124
+        $this->assertAttributeEquals(
125
+            12,
126
+            'maxIteration',
127
+            $this->subject
128
+        );
129
+    }
130
+
131
+    /**
132
+     * @test
133
+     */
134
+    public function getMetadataObjectReturnsInitialValueForMetadataObject() {
135
+        $newObjectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
136
+        $this->assertEquals(
137
+            $newObjectStorage,
138
+            $this->subject->getMetadataObject()
139
+        );
140
+    }
141
+
142
+    /**
143
+     * @test
144
+     */
145
+    public function setMetadataObjectForObjectStorageContainingMetadataObjectSetsMetadataObject() {
146
+        $metadataObject = new \EWW\Dpf\Domain\Model\MetadataObject();
147
+        $objectStorageHoldingExactlyOneMetadataObject = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
148
+        $objectStorageHoldingExactlyOneMetadataObject->attach($metadataObject);
149
+        $this->subject->setMetadataObject($objectStorageHoldingExactlyOneMetadataObject);
150
+
151
+        $this->assertAttributeEquals(
152
+            $objectStorageHoldingExactlyOneMetadataObject,
153
+            'metadataObject',
154
+            $this->subject
155
+        );
156
+    }
157
+
158
+    /**
159
+     * @test
160
+     */
161
+    public function addMetadataObjectToObjectStorageHoldingMetadataObject() {
162
+        $metadataObject = new \EWW\Dpf\Domain\Model\MetadataObject();
163
+        $metadataObjectObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('attach'), array(), '', FALSE);
164
+        $metadataObjectObjectStorageMock->expects($this->once())->method('attach')->with($this->equalTo($metadataObject));
165
+        $this->inject($this->subject, 'metadataObject', $metadataObjectObjectStorageMock);
166
+
167
+        $this->subject->addMetadataObject($metadataObject);
168
+    }
169
+
170
+    /**
171
+     * @test
172
+     */
173
+    public function removeMetadataObjectFromObjectStorageHoldingMetadataObject() {
174
+        $metadataObject = new \EWW\Dpf\Domain\Model\MetadataObject();
175
+        $metadataObjectObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('detach'), array(), '', FALSE);
176
+        $metadataObjectObjectStorageMock->expects($this->once())->method('detach')->with($this->equalTo($metadataObject));
177
+        $this->inject($this->subject, 'metadataObject', $metadataObjectObjectStorageMock);
178
+
179
+        $this->subject->removeMetadataObject($metadataObject);
180
+
181
+    }
182 182
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	 */
161 161
 	public function addMetadataObjectToObjectStorageHoldingMetadataObject() {
162 162
 		$metadataObject = new \EWW\Dpf\Domain\Model\MetadataObject();
163
-		$metadataObjectObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('attach'), array(), '', FALSE);
163
+		$metadataObjectObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array ('attach'), array (), '', FALSE);
164 164
 		$metadataObjectObjectStorageMock->expects($this->once())->method('attach')->with($this->equalTo($metadataObject));
165 165
 		$this->inject($this->subject, 'metadataObject', $metadataObjectObjectStorageMock);
166 166
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 	 */
173 173
 	public function removeMetadataObjectFromObjectStorageHoldingMetadataObject() {
174 174
 		$metadataObject = new \EWW\Dpf\Domain\Model\MetadataObject();
175
-		$metadataObjectObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('detach'), array(), '', FALSE);
175
+		$metadataObjectObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array ('detach'), array (), '', FALSE);
176 176
 		$metadataObjectObjectStorageMock->expects($this->once())->method('detach')->with($this->equalTo($metadataObject));
177 177
 		$this->inject($this->subject, 'metadataObject', $metadataObjectObjectStorageMock);
178 178
 
Please login to merge, or discard this patch.
Tests/Unit/Domain/Model/MetadataPageTest.php 2 patches
Indentation   +133 added lines, -133 removed lines patch added patch discarded remove patch
@@ -23,137 +23,137 @@
 block discarded – undo
23 23
  *
24 24
  */
25 25
 class MetadataPageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
26
-	/**
27
-	 * @var \EWW\Dpf\Domain\Model\MetadataPage
28
-	 */
29
-	protected $subject = NULL;
30
-
31
-	protected function setUp() {
32
-		$this->subject = new \EWW\Dpf\Domain\Model\MetadataPage();
33
-	}
34
-
35
-	protected function tearDown() {
36
-		unset($this->subject);
37
-	}
38
-
39
-	/**
40
-	 * @test
41
-	 */
42
-	public function getNameReturnsInitialValueForString() {
43
-		$this->assertSame(
44
-			'',
45
-			$this->subject->getName()
46
-		);
47
-	}
48
-
49
-	/**
50
-	 * @test
51
-	 */
52
-	public function setNameForStringSetsName() {
53
-		$this->subject->setName('Conceived at T3CON10');
54
-
55
-		$this->assertAttributeEquals(
56
-			'Conceived at T3CON10',
57
-			'name',
58
-			$this->subject
59
-		);
60
-	}
61
-
62
-	/**
63
-	 * @test
64
-	 */
65
-	public function getDisplayNameReturnsInitialValueForString() {
66
-		$this->assertSame(
67
-			'',
68
-			$this->subject->getDisplayName()
69
-		);
70
-	}
71
-
72
-	/**
73
-	 * @test
74
-	 */
75
-	public function setDisplayNameForStringSetsDisplayName() {
76
-		$this->subject->setDisplayName('Conceived at T3CON10');
77
-
78
-		$this->assertAttributeEquals(
79
-			'Conceived at T3CON10',
80
-			'displayName',
81
-			$this->subject
82
-		);
83
-	}
84
-
85
-	/**
86
-	 * @test
87
-	 */
88
-	public function getPageNumberReturnsInitialValueForInteger() {
89
-		$this->assertSame(
90
-			0,
91
-			$this->subject->getPageNumber()
92
-		);
93
-	}
94
-
95
-	/**
96
-	 * @test
97
-	 */
98
-	public function setPageNumberForIntegerSetsPageNumber() {
99
-		$this->subject->setPageNumber(12);
100
-
101
-		$this->assertAttributeEquals(
102
-			12,
103
-			'pageNumber',
104
-			$this->subject
105
-		);
106
-	}
107
-
108
-	/**
109
-	 * @test
110
-	 */
111
-	public function getMetadataGroupReturnsInitialValueForMetadataGroup() {
112
-		$newObjectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
113
-		$this->assertEquals(
114
-			$newObjectStorage,
115
-			$this->subject->getMetadataGroup()
116
-		);
117
-	}
118
-
119
-	/**
120
-	 * @test
121
-	 */
122
-	public function setMetadataGroupForObjectStorageContainingMetadataGroupSetsMetadataGroup() {
123
-		$metadataGroup = new \EWW\Dpf\Domain\Model\MetadataGroup();
124
-		$objectStorageHoldingExactlyOneMetadataGroup = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
125
-		$objectStorageHoldingExactlyOneMetadataGroup->attach($metadataGroup);
126
-		$this->subject->setMetadataGroup($objectStorageHoldingExactlyOneMetadataGroup);
127
-
128
-		$this->assertAttributeEquals(
129
-			$objectStorageHoldingExactlyOneMetadataGroup,
130
-			'metadataGroup',
131
-			$this->subject
132
-		);
133
-	}
134
-
135
-	/**
136
-	 * @test
137
-	 */
138
-	public function addMetadataGroupToObjectStorageHoldingMetadataGroup() {
139
-		$metadataGroup = new \EWW\Dpf\Domain\Model\MetadataGroup();
140
-		$metadataGroupObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('attach'), array(), '', FALSE);
141
-		$metadataGroupObjectStorageMock->expects($this->once())->method('attach')->with($this->equalTo($metadataGroup));
142
-		$this->inject($this->subject, 'metadataGroup', $metadataGroupObjectStorageMock);
143
-
144
-		$this->subject->addMetadataGroup($metadataGroup);
145
-	}
146
-
147
-	/**
148
-	 * @test
149
-	 */
150
-	public function removeMetadataGroupFromObjectStorageHoldingMetadataGroup() {
151
-		$metadataGroup = new \EWW\Dpf\Domain\Model\MetadataGroup();
152
-		$metadataGroupObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('detach'), array(), '', FALSE);
153
-		$metadataGroupObjectStorageMock->expects($this->once())->method('detach')->with($this->equalTo($metadataGroup));
154
-		$this->inject($this->subject, 'metadataGroup', $metadataGroupObjectStorageMock);
155
-
156
-		$this->subject->removeMetadataGroup($metadataGroup);
157
-
158
-	}
26
+    /**
27
+     * @var \EWW\Dpf\Domain\Model\MetadataPage
28
+     */
29
+    protected $subject = NULL;
30
+
31
+    protected function setUp() {
32
+        $this->subject = new \EWW\Dpf\Domain\Model\MetadataPage();
33
+    }
34
+
35
+    protected function tearDown() {
36
+        unset($this->subject);
37
+    }
38
+
39
+    /**
40
+     * @test
41
+     */
42
+    public function getNameReturnsInitialValueForString() {
43
+        $this->assertSame(
44
+            '',
45
+            $this->subject->getName()
46
+        );
47
+    }
48
+
49
+    /**
50
+     * @test
51
+     */
52
+    public function setNameForStringSetsName() {
53
+        $this->subject->setName('Conceived at T3CON10');
54
+
55
+        $this->assertAttributeEquals(
56
+            'Conceived at T3CON10',
57
+            'name',
58
+            $this->subject
59
+        );
60
+    }
61
+
62
+    /**
63
+     * @test
64
+     */
65
+    public function getDisplayNameReturnsInitialValueForString() {
66
+        $this->assertSame(
67
+            '',
68
+            $this->subject->getDisplayName()
69
+        );
70
+    }
71
+
72
+    /**
73
+     * @test
74
+     */
75
+    public function setDisplayNameForStringSetsDisplayName() {
76
+        $this->subject->setDisplayName('Conceived at T3CON10');
77
+
78
+        $this->assertAttributeEquals(
79
+            'Conceived at T3CON10',
80
+            'displayName',
81
+            $this->subject
82
+        );
83
+    }
84
+
85
+    /**
86
+     * @test
87
+     */
88
+    public function getPageNumberReturnsInitialValueForInteger() {
89
+        $this->assertSame(
90
+            0,
91
+            $this->subject->getPageNumber()
92
+        );
93
+    }
94
+
95
+    /**
96
+     * @test
97
+     */
98
+    public function setPageNumberForIntegerSetsPageNumber() {
99
+        $this->subject->setPageNumber(12);
100
+
101
+        $this->assertAttributeEquals(
102
+            12,
103
+            'pageNumber',
104
+            $this->subject
105
+        );
106
+    }
107
+
108
+    /**
109
+     * @test
110
+     */
111
+    public function getMetadataGroupReturnsInitialValueForMetadataGroup() {
112
+        $newObjectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
113
+        $this->assertEquals(
114
+            $newObjectStorage,
115
+            $this->subject->getMetadataGroup()
116
+        );
117
+    }
118
+
119
+    /**
120
+     * @test
121
+     */
122
+    public function setMetadataGroupForObjectStorageContainingMetadataGroupSetsMetadataGroup() {
123
+        $metadataGroup = new \EWW\Dpf\Domain\Model\MetadataGroup();
124
+        $objectStorageHoldingExactlyOneMetadataGroup = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
125
+        $objectStorageHoldingExactlyOneMetadataGroup->attach($metadataGroup);
126
+        $this->subject->setMetadataGroup($objectStorageHoldingExactlyOneMetadataGroup);
127
+
128
+        $this->assertAttributeEquals(
129
+            $objectStorageHoldingExactlyOneMetadataGroup,
130
+            'metadataGroup',
131
+            $this->subject
132
+        );
133
+    }
134
+
135
+    /**
136
+     * @test
137
+     */
138
+    public function addMetadataGroupToObjectStorageHoldingMetadataGroup() {
139
+        $metadataGroup = new \EWW\Dpf\Domain\Model\MetadataGroup();
140
+        $metadataGroupObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('attach'), array(), '', FALSE);
141
+        $metadataGroupObjectStorageMock->expects($this->once())->method('attach')->with($this->equalTo($metadataGroup));
142
+        $this->inject($this->subject, 'metadataGroup', $metadataGroupObjectStorageMock);
143
+
144
+        $this->subject->addMetadataGroup($metadataGroup);
145
+    }
146
+
147
+    /**
148
+     * @test
149
+     */
150
+    public function removeMetadataGroupFromObjectStorageHoldingMetadataGroup() {
151
+        $metadataGroup = new \EWW\Dpf\Domain\Model\MetadataGroup();
152
+        $metadataGroupObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('detach'), array(), '', FALSE);
153
+        $metadataGroupObjectStorageMock->expects($this->once())->method('detach')->with($this->equalTo($metadataGroup));
154
+        $this->inject($this->subject, 'metadataGroup', $metadataGroupObjectStorageMock);
155
+
156
+        $this->subject->removeMetadataGroup($metadataGroup);
157
+
158
+    }
159 159
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 	 */
138 138
 	public function addMetadataGroupToObjectStorageHoldingMetadataGroup() {
139 139
 		$metadataGroup = new \EWW\Dpf\Domain\Model\MetadataGroup();
140
-		$metadataGroupObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('attach'), array(), '', FALSE);
140
+		$metadataGroupObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array ('attach'), array (), '', FALSE);
141 141
 		$metadataGroupObjectStorageMock->expects($this->once())->method('attach')->with($this->equalTo($metadataGroup));
142 142
 		$this->inject($this->subject, 'metadataGroup', $metadataGroupObjectStorageMock);
143 143
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	 */
150 150
 	public function removeMetadataGroupFromObjectStorageHoldingMetadataGroup() {
151 151
 		$metadataGroup = new \EWW\Dpf\Domain\Model\MetadataGroup();
152
-		$metadataGroupObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('detach'), array(), '', FALSE);
152
+		$metadataGroupObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array ('detach'), array (), '', FALSE);
153 153
 		$metadataGroupObjectStorageMock->expects($this->once())->method('detach')->with($this->equalTo($metadataGroup));
154 154
 		$this->inject($this->subject, 'metadataGroup', $metadataGroupObjectStorageMock);
155 155
 
Please login to merge, or discard this patch.
Tests/Unit/Domain/Model/DocumentTest.php 1 patch
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -23,63 +23,63 @@
 block discarded – undo
23 23
  *
24 24
  */
25 25
 class DocumentTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
26
-	/**
27
-	 * @var \EWW\Dpf\Domain\Model\Document
28
-	 */
29
-	protected $subject = NULL;
26
+    /**
27
+     * @var \EWW\Dpf\Domain\Model\Document
28
+     */
29
+    protected $subject = NULL;
30 30
 
31
-	protected function setUp() {
32
-		$this->subject = new \EWW\Dpf\Domain\Model\Document();
33
-	}
31
+    protected function setUp() {
32
+        $this->subject = new \EWW\Dpf\Domain\Model\Document();
33
+    }
34 34
 
35
-	protected function tearDown() {
36
-		unset($this->subject);
37
-	}
35
+    protected function tearDown() {
36
+        unset($this->subject);
37
+    }
38 38
 
39
-	/**
40
-	 * @test
41
-	 */
42
-	public function getXmlDataReturnsInitialValueForString() {
43
-		$this->assertSame(
44
-			'',
45
-			$this->subject->getXmlData()
46
-		);
47
-	}
39
+    /**
40
+     * @test
41
+     */
42
+    public function getXmlDataReturnsInitialValueForString() {
43
+        $this->assertSame(
44
+            '',
45
+            $this->subject->getXmlData()
46
+        );
47
+    }
48 48
 
49
-	/**
50
-	 * @test
51
-	 */
52
-	public function setXmlDataForStringSetsXmlData() {
53
-		$this->subject->setXmlData('Conceived at T3CON10');
49
+    /**
50
+     * @test
51
+     */
52
+    public function setXmlDataForStringSetsXmlData() {
53
+        $this->subject->setXmlData('Conceived at T3CON10');
54 54
 
55
-		$this->assertAttributeEquals(
56
-			'Conceived at T3CON10',
57
-			'xmlData',
58
-			$this->subject
59
-		);
60
-	}
55
+        $this->assertAttributeEquals(
56
+            'Conceived at T3CON10',
57
+            'xmlData',
58
+            $this->subject
59
+        );
60
+    }
61 61
 
62
-	/**
63
-	 * @test
64
-	 */
65
-	public function getDocumentTypeReturnsInitialValueForDocumentType() {
66
-		$this->assertEquals(
67
-			NULL,
68
-			$this->subject->getDocumentType()
69
-		);
70
-	}
62
+    /**
63
+     * @test
64
+     */
65
+    public function getDocumentTypeReturnsInitialValueForDocumentType() {
66
+        $this->assertEquals(
67
+            NULL,
68
+            $this->subject->getDocumentType()
69
+        );
70
+    }
71 71
 
72
-	/**
73
-	 * @test
74
-	 */
75
-	public function setDocumentTypeForDocumentTypeSetsDocumentType() {
76
-		$documentTypeFixture = new \EWW\Dpf\Domain\Model\DocumentType();
77
-		$this->subject->setDocumentType($documentTypeFixture);
72
+    /**
73
+     * @test
74
+     */
75
+    public function setDocumentTypeForDocumentTypeSetsDocumentType() {
76
+        $documentTypeFixture = new \EWW\Dpf\Domain\Model\DocumentType();
77
+        $this->subject->setDocumentType($documentTypeFixture);
78 78
 
79
-		$this->assertAttributeEquals(
80
-			$documentTypeFixture,
81
-			'documentType',
82
-			$this->subject
83
-		);
84
-	}
79
+        $this->assertAttributeEquals(
80
+            $documentTypeFixture,
81
+            'documentType',
82
+            $this->subject
83
+        );
84
+    }
85 85
 }
Please login to merge, or discard this patch.
Tests/Unit/Domain/Model/DocumentsTest.php 1 patch
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -23,63 +23,63 @@
 block discarded – undo
23 23
  *
24 24
  */
25 25
 class DocumentsTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
26
-	/**
27
-	 * @var \EWW\Dpf\Domain\Model\Documents
28
-	 */
29
-	protected $subject = NULL;
26
+    /**
27
+     * @var \EWW\Dpf\Domain\Model\Documents
28
+     */
29
+    protected $subject = NULL;
30 30
 
31
-	protected function setUp() {
32
-		$this->subject = new \EWW\Dpf\Domain\Model\Documents();
33
-	}
31
+    protected function setUp() {
32
+        $this->subject = new \EWW\Dpf\Domain\Model\Documents();
33
+    }
34 34
 
35
-	protected function tearDown() {
36
-		unset($this->subject);
37
-	}
35
+    protected function tearDown() {
36
+        unset($this->subject);
37
+    }
38 38
 
39
-	/**
40
-	 * @test
41
-	 */
42
-	public function getXmlDataReturnsInitialValueForString() {
43
-		$this->assertSame(
44
-			'',
45
-			$this->subject->getXmlData()
46
-		);
47
-	}
39
+    /**
40
+     * @test
41
+     */
42
+    public function getXmlDataReturnsInitialValueForString() {
43
+        $this->assertSame(
44
+            '',
45
+            $this->subject->getXmlData()
46
+        );
47
+    }
48 48
 
49
-	/**
50
-	 * @test
51
-	 */
52
-	public function setXmlDataForStringSetsXmlData() {
53
-		$this->subject->setXmlData('Conceived at T3CON10');
49
+    /**
50
+     * @test
51
+     */
52
+    public function setXmlDataForStringSetsXmlData() {
53
+        $this->subject->setXmlData('Conceived at T3CON10');
54 54
 
55
-		$this->assertAttributeEquals(
56
-			'Conceived at T3CON10',
57
-			'xmlData',
58
-			$this->subject
59
-		);
60
-	}
55
+        $this->assertAttributeEquals(
56
+            'Conceived at T3CON10',
57
+            'xmlData',
58
+            $this->subject
59
+        );
60
+    }
61 61
 
62
-	/**
63
-	 * @test
64
-	 */
65
-	public function getDocumentTypeReturnsInitialValueForDocumentType() {
66
-		$this->assertEquals(
67
-			NULL,
68
-			$this->subject->getDocumentType()
69
-		);
70
-	}
62
+    /**
63
+     * @test
64
+     */
65
+    public function getDocumentTypeReturnsInitialValueForDocumentType() {
66
+        $this->assertEquals(
67
+            NULL,
68
+            $this->subject->getDocumentType()
69
+        );
70
+    }
71 71
 
72
-	/**
73
-	 * @test
74
-	 */
75
-	public function setDocumentTypeForDocumentTypeSetsDocumentType() {
76
-		$documentTypeFixture = new \EWW\Dpf\Domain\Model\DocumentType();
77
-		$this->subject->setDocumentType($documentTypeFixture);
72
+    /**
73
+     * @test
74
+     */
75
+    public function setDocumentTypeForDocumentTypeSetsDocumentType() {
76
+        $documentTypeFixture = new \EWW\Dpf\Domain\Model\DocumentType();
77
+        $this->subject->setDocumentType($documentTypeFixture);
78 78
 
79
-		$this->assertAttributeEquals(
80
-			$documentTypeFixture,
81
-			'documentType',
82
-			$this->subject
83
-		);
84
-	}
79
+        $this->assertAttributeEquals(
80
+            $documentTypeFixture,
81
+            'documentType',
82
+            $this->subject
83
+        );
84
+    }
85 85
 }
Please login to merge, or discard this patch.
Tests/Unit/Domain/Model/DocumentTypeTest.php 2 patches
Indentation   +110 added lines, -110 removed lines patch added patch discarded remove patch
@@ -23,114 +23,114 @@
 block discarded – undo
23 23
  *
24 24
  */
25 25
 class DocumentTypeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
26
-	/**
27
-	 * @var \EWW\Dpf\Domain\Model\DocumentType
28
-	 */
29
-	protected $subject = NULL;
30
-
31
-	protected function setUp() {
32
-		$this->subject = new \EWW\Dpf\Domain\Model\DocumentType();
33
-	}
34
-
35
-	protected function tearDown() {
36
-		unset($this->subject);
37
-	}
38
-
39
-	/**
40
-	 * @test
41
-	 */
42
-	public function getNameReturnsInitialValueForString() {
43
-		$this->assertSame(
44
-			'',
45
-			$this->subject->getName()
46
-		);
47
-	}
48
-
49
-	/**
50
-	 * @test
51
-	 */
52
-	public function setNameForStringSetsName() {
53
-		$this->subject->setName('Conceived at T3CON10');
54
-
55
-		$this->assertAttributeEquals(
56
-			'Conceived at T3CON10',
57
-			'name',
58
-			$this->subject
59
-		);
60
-	}
61
-
62
-	/**
63
-	 * @test
64
-	 */
65
-	public function getDisplayNameReturnsInitialValueForString() {
66
-		$this->assertSame(
67
-			'',
68
-			$this->subject->getDisplayName()
69
-		);
70
-	}
71
-
72
-	/**
73
-	 * @test
74
-	 */
75
-	public function setDisplayNameForStringSetsDisplayName() {
76
-		$this->subject->setDisplayName('Conceived at T3CON10');
77
-
78
-		$this->assertAttributeEquals(
79
-			'Conceived at T3CON10',
80
-			'displayName',
81
-			$this->subject
82
-		);
83
-	}
84
-
85
-	/**
86
-	 * @test
87
-	 */
88
-	public function getMetadataPageReturnsInitialValueForMetadataPage() {
89
-		$newObjectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
90
-		$this->assertEquals(
91
-			$newObjectStorage,
92
-			$this->subject->getMetadataPage()
93
-		);
94
-	}
95
-
96
-	/**
97
-	 * @test
98
-	 */
99
-	public function setMetadataPageForObjectStorageContainingMetadataPageSetsMetadataPage() {
100
-		$metadataPage = new \EWW\Dpf\Domain\Model\MetadataPage();
101
-		$objectStorageHoldingExactlyOneMetadataPage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
102
-		$objectStorageHoldingExactlyOneMetadataPage->attach($metadataPage);
103
-		$this->subject->setMetadataPage($objectStorageHoldingExactlyOneMetadataPage);
104
-
105
-		$this->assertAttributeEquals(
106
-			$objectStorageHoldingExactlyOneMetadataPage,
107
-			'metadataPage',
108
-			$this->subject
109
-		);
110
-	}
111
-
112
-	/**
113
-	 * @test
114
-	 */
115
-	public function addMetadataPageToObjectStorageHoldingMetadataPage() {
116
-		$metadataPage = new \EWW\Dpf\Domain\Model\MetadataPage();
117
-		$metadataPageObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('attach'), array(), '', FALSE);
118
-		$metadataPageObjectStorageMock->expects($this->once())->method('attach')->with($this->equalTo($metadataPage));
119
-		$this->inject($this->subject, 'metadataPage', $metadataPageObjectStorageMock);
120
-
121
-		$this->subject->addMetadataPage($metadataPage);
122
-	}
123
-
124
-	/**
125
-	 * @test
126
-	 */
127
-	public function removeMetadataPageFromObjectStorageHoldingMetadataPage() {
128
-		$metadataPage = new \EWW\Dpf\Domain\Model\MetadataPage();
129
-		$metadataPageObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('detach'), array(), '', FALSE);
130
-		$metadataPageObjectStorageMock->expects($this->once())->method('detach')->with($this->equalTo($metadataPage));
131
-		$this->inject($this->subject, 'metadataPage', $metadataPageObjectStorageMock);
132
-
133
-		$this->subject->removeMetadataPage($metadataPage);
134
-
135
-	}
26
+    /**
27
+     * @var \EWW\Dpf\Domain\Model\DocumentType
28
+     */
29
+    protected $subject = NULL;
30
+
31
+    protected function setUp() {
32
+        $this->subject = new \EWW\Dpf\Domain\Model\DocumentType();
33
+    }
34
+
35
+    protected function tearDown() {
36
+        unset($this->subject);
37
+    }
38
+
39
+    /**
40
+     * @test
41
+     */
42
+    public function getNameReturnsInitialValueForString() {
43
+        $this->assertSame(
44
+            '',
45
+            $this->subject->getName()
46
+        );
47
+    }
48
+
49
+    /**
50
+     * @test
51
+     */
52
+    public function setNameForStringSetsName() {
53
+        $this->subject->setName('Conceived at T3CON10');
54
+
55
+        $this->assertAttributeEquals(
56
+            'Conceived at T3CON10',
57
+            'name',
58
+            $this->subject
59
+        );
60
+    }
61
+
62
+    /**
63
+     * @test
64
+     */
65
+    public function getDisplayNameReturnsInitialValueForString() {
66
+        $this->assertSame(
67
+            '',
68
+            $this->subject->getDisplayName()
69
+        );
70
+    }
71
+
72
+    /**
73
+     * @test
74
+     */
75
+    public function setDisplayNameForStringSetsDisplayName() {
76
+        $this->subject->setDisplayName('Conceived at T3CON10');
77
+
78
+        $this->assertAttributeEquals(
79
+            'Conceived at T3CON10',
80
+            'displayName',
81
+            $this->subject
82
+        );
83
+    }
84
+
85
+    /**
86
+     * @test
87
+     */
88
+    public function getMetadataPageReturnsInitialValueForMetadataPage() {
89
+        $newObjectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
90
+        $this->assertEquals(
91
+            $newObjectStorage,
92
+            $this->subject->getMetadataPage()
93
+        );
94
+    }
95
+
96
+    /**
97
+     * @test
98
+     */
99
+    public function setMetadataPageForObjectStorageContainingMetadataPageSetsMetadataPage() {
100
+        $metadataPage = new \EWW\Dpf\Domain\Model\MetadataPage();
101
+        $objectStorageHoldingExactlyOneMetadataPage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
102
+        $objectStorageHoldingExactlyOneMetadataPage->attach($metadataPage);
103
+        $this->subject->setMetadataPage($objectStorageHoldingExactlyOneMetadataPage);
104
+
105
+        $this->assertAttributeEquals(
106
+            $objectStorageHoldingExactlyOneMetadataPage,
107
+            'metadataPage',
108
+            $this->subject
109
+        );
110
+    }
111
+
112
+    /**
113
+     * @test
114
+     */
115
+    public function addMetadataPageToObjectStorageHoldingMetadataPage() {
116
+        $metadataPage = new \EWW\Dpf\Domain\Model\MetadataPage();
117
+        $metadataPageObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('attach'), array(), '', FALSE);
118
+        $metadataPageObjectStorageMock->expects($this->once())->method('attach')->with($this->equalTo($metadataPage));
119
+        $this->inject($this->subject, 'metadataPage', $metadataPageObjectStorageMock);
120
+
121
+        $this->subject->addMetadataPage($metadataPage);
122
+    }
123
+
124
+    /**
125
+     * @test
126
+     */
127
+    public function removeMetadataPageFromObjectStorageHoldingMetadataPage() {
128
+        $metadataPage = new \EWW\Dpf\Domain\Model\MetadataPage();
129
+        $metadataPageObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('detach'), array(), '', FALSE);
130
+        $metadataPageObjectStorageMock->expects($this->once())->method('detach')->with($this->equalTo($metadataPage));
131
+        $this->inject($this->subject, 'metadataPage', $metadataPageObjectStorageMock);
132
+
133
+        $this->subject->removeMetadataPage($metadataPage);
134
+
135
+    }
136 136
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 */
115 115
 	public function addMetadataPageToObjectStorageHoldingMetadataPage() {
116 116
 		$metadataPage = new \EWW\Dpf\Domain\Model\MetadataPage();
117
-		$metadataPageObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('attach'), array(), '', FALSE);
117
+		$metadataPageObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array ('attach'), array (), '', FALSE);
118 118
 		$metadataPageObjectStorageMock->expects($this->once())->method('attach')->with($this->equalTo($metadataPage));
119 119
 		$this->inject($this->subject, 'metadataPage', $metadataPageObjectStorageMock);
120 120
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	 */
127 127
 	public function removeMetadataPageFromObjectStorageHoldingMetadataPage() {
128 128
 		$metadataPage = new \EWW\Dpf\Domain\Model\MetadataPage();
129
-		$metadataPageObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('detach'), array(), '', FALSE);
129
+		$metadataPageObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array ('detach'), array (), '', FALSE);
130 130
 		$metadataPageObjectStorageMock->expects($this->once())->method('detach')->with($this->equalTo($metadataPage));
131 131
 		$this->inject($this->subject, 'metadataPage', $metadataPageObjectStorageMock);
132 132
 
Please login to merge, or discard this patch.
Tests/Unit/Domain/Model/MetadataObjectTest.php 1 patch
Indentation   +150 added lines, -150 removed lines patch added patch discarded remove patch
@@ -23,154 +23,154 @@
 block discarded – undo
23 23
  *
24 24
  */
25 25
 class MetadataObjectTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
26
-	/**
27
-	 * @var \EWW\Dpf\Domain\Model\MetadataObject
28
-	 */
29
-	protected $subject = NULL;
30
-
31
-	protected function setUp() {
32
-		$this->subject = new \EWW\Dpf\Domain\Model\MetadataObject();
33
-	}
34
-
35
-	protected function tearDown() {
36
-		unset($this->subject);
37
-	}
38
-
39
-	/**
40
-	 * @test
41
-	 */
42
-	public function getNameReturnsInitialValueForString() {
43
-		$this->assertSame(
44
-			'',
45
-			$this->subject->getName()
46
-		);
47
-	}
48
-
49
-	/**
50
-	 * @test
51
-	 */
52
-	public function setNameForStringSetsName() {
53
-		$this->subject->setName('Conceived at T3CON10');
54
-
55
-		$this->assertAttributeEquals(
56
-			'Conceived at T3CON10',
57
-			'name',
58
-			$this->subject
59
-		);
60
-	}
61
-
62
-	/**
63
-	 * @test
64
-	 */
65
-	public function getDisplayNameReturnsInitialValueForString() {
66
-		$this->assertSame(
67
-			'',
68
-			$this->subject->getDisplayName()
69
-		);
70
-	}
71
-
72
-	/**
73
-	 * @test
74
-	 */
75
-	public function setDisplayNameForStringSetsDisplayName() {
76
-		$this->subject->setDisplayName('Conceived at T3CON10');
77
-
78
-		$this->assertAttributeEquals(
79
-			'Conceived at T3CON10',
80
-			'displayName',
81
-			$this->subject
82
-		);
83
-	}
84
-
85
-	/**
86
-	 * @test
87
-	 */
88
-	public function getMaxIterationReturnsInitialValueForInteger() {
89
-		$this->assertSame(
90
-			0,
91
-			$this->subject->getMaxIteration()
92
-		);
93
-	}
94
-
95
-	/**
96
-	 * @test
97
-	 */
98
-	public function setMaxIterationForIntegerSetsMaxIteration() {
99
-		$this->subject->setMaxIteration(12);
100
-
101
-		$this->assertAttributeEquals(
102
-			12,
103
-			'maxIteration',
104
-			$this->subject
105
-		);
106
-	}
107
-
108
-	/**
109
-	 * @test
110
-	 */
111
-	public function getMandatoryReturnsInitialValueForBoolean() {
112
-		$this->assertSame(
113
-			FALSE,
114
-			$this->subject->getMandatory()
115
-		);
116
-	}
117
-
118
-	/**
119
-	 * @test
120
-	 */
121
-	public function setMandatoryForBooleanSetsMandatory() {
122
-		$this->subject->setMandatory(TRUE);
123
-
124
-		$this->assertAttributeEquals(
125
-			TRUE,
126
-			'mandatory',
127
-			$this->subject
128
-		);
129
-	}
130
-
131
-	/**
132
-	 * @test
133
-	 */
134
-	public function getMappingReturnsInitialValueForString() {
135
-		$this->assertSame(
136
-			'',
137
-			$this->subject->getMapping()
138
-		);
139
-	}
140
-
141
-	/**
142
-	 * @test
143
-	 */
144
-	public function setMappingForStringSetsMapping() {
145
-		$this->subject->setMapping('Conceived at T3CON10');
146
-
147
-		$this->assertAttributeEquals(
148
-			'Conceived at T3CON10',
149
-			'mapping',
150
-			$this->subject
151
-		);
152
-	}
153
-
154
-	/**
155
-	 * @test
156
-	 */
157
-	public function getInputFieldReturnsInitialValueForInteger() {
158
-		$this->assertSame(
159
-			0,
160
-			$this->subject->getInputField()
161
-		);
162
-	}
163
-
164
-	/**
165
-	 * @test
166
-	 */
167
-	public function setInputFieldForIntegerSetsInputField() {
168
-		$this->subject->setInputField(12);
169
-
170
-		$this->assertAttributeEquals(
171
-			12,
172
-			'inputField',
173
-			$this->subject
174
-		);
175
-	}
26
+    /**
27
+     * @var \EWW\Dpf\Domain\Model\MetadataObject
28
+     */
29
+    protected $subject = NULL;
30
+
31
+    protected function setUp() {
32
+        $this->subject = new \EWW\Dpf\Domain\Model\MetadataObject();
33
+    }
34
+
35
+    protected function tearDown() {
36
+        unset($this->subject);
37
+    }
38
+
39
+    /**
40
+     * @test
41
+     */
42
+    public function getNameReturnsInitialValueForString() {
43
+        $this->assertSame(
44
+            '',
45
+            $this->subject->getName()
46
+        );
47
+    }
48
+
49
+    /**
50
+     * @test
51
+     */
52
+    public function setNameForStringSetsName() {
53
+        $this->subject->setName('Conceived at T3CON10');
54
+
55
+        $this->assertAttributeEquals(
56
+            'Conceived at T3CON10',
57
+            'name',
58
+            $this->subject
59
+        );
60
+    }
61
+
62
+    /**
63
+     * @test
64
+     */
65
+    public function getDisplayNameReturnsInitialValueForString() {
66
+        $this->assertSame(
67
+            '',
68
+            $this->subject->getDisplayName()
69
+        );
70
+    }
71
+
72
+    /**
73
+     * @test
74
+     */
75
+    public function setDisplayNameForStringSetsDisplayName() {
76
+        $this->subject->setDisplayName('Conceived at T3CON10');
77
+
78
+        $this->assertAttributeEquals(
79
+            'Conceived at T3CON10',
80
+            'displayName',
81
+            $this->subject
82
+        );
83
+    }
84
+
85
+    /**
86
+     * @test
87
+     */
88
+    public function getMaxIterationReturnsInitialValueForInteger() {
89
+        $this->assertSame(
90
+            0,
91
+            $this->subject->getMaxIteration()
92
+        );
93
+    }
94
+
95
+    /**
96
+     * @test
97
+     */
98
+    public function setMaxIterationForIntegerSetsMaxIteration() {
99
+        $this->subject->setMaxIteration(12);
100
+
101
+        $this->assertAttributeEquals(
102
+            12,
103
+            'maxIteration',
104
+            $this->subject
105
+        );
106
+    }
107
+
108
+    /**
109
+     * @test
110
+     */
111
+    public function getMandatoryReturnsInitialValueForBoolean() {
112
+        $this->assertSame(
113
+            FALSE,
114
+            $this->subject->getMandatory()
115
+        );
116
+    }
117
+
118
+    /**
119
+     * @test
120
+     */
121
+    public function setMandatoryForBooleanSetsMandatory() {
122
+        $this->subject->setMandatory(TRUE);
123
+
124
+        $this->assertAttributeEquals(
125
+            TRUE,
126
+            'mandatory',
127
+            $this->subject
128
+        );
129
+    }
130
+
131
+    /**
132
+     * @test
133
+     */
134
+    public function getMappingReturnsInitialValueForString() {
135
+        $this->assertSame(
136
+            '',
137
+            $this->subject->getMapping()
138
+        );
139
+    }
140
+
141
+    /**
142
+     * @test
143
+     */
144
+    public function setMappingForStringSetsMapping() {
145
+        $this->subject->setMapping('Conceived at T3CON10');
146
+
147
+        $this->assertAttributeEquals(
148
+            'Conceived at T3CON10',
149
+            'mapping',
150
+            $this->subject
151
+        );
152
+    }
153
+
154
+    /**
155
+     * @test
156
+     */
157
+    public function getInputFieldReturnsInitialValueForInteger() {
158
+        $this->assertSame(
159
+            0,
160
+            $this->subject->getInputField()
161
+        );
162
+    }
163
+
164
+    /**
165
+     * @test
166
+     */
167
+    public function setInputFieldForIntegerSetsInputField() {
168
+        $this->subject->setInputField(12);
169
+
170
+        $this->assertAttributeEquals(
171
+            12,
172
+            'inputField',
173
+            $this->subject
174
+        );
175
+    }
176 176
 }
Please login to merge, or discard this patch.