@@ 137-154 (lines=18) @@ | ||
134 | } |
|
135 | ||
136 | ||
137 | public function testIsObjectWithBadDesignerServiceOK() |
|
138 | { |
|
139 | $unwanted = "Data service type cannot be null"; |
|
140 | $unwanted2 = "Version cannot be null or empty"; |
|
141 | $actual = null; |
|
142 | $designer = m::mock(TDesignerType::class); |
|
143 | $designer->shouldReceive('isOK')->andReturn(true, false)->twice(); |
|
144 | $dataServiceType = m::mock(TDataServicesType::class); |
|
145 | $dataServiceType->shouldReceive('isOK')->andReturn(true)->once(); |
|
146 | $foo = new TEdmxType(); |
|
147 | $foo->setVersion("1.5"); |
|
148 | $foo->setDataServiceType($dataServiceType); |
|
149 | $foo->setDesigner($designer); |
|
150 | ||
151 | $this->assertFalse($foo->isOK($actual)); |
|
152 | $this->assertNotEquals($unwanted, $actual); |
|
153 | $this->assertNotEquals($unwanted2, $actual); |
|
154 | } |
|
155 | ||
156 | public function testIsObjectWithBadRuntimeServiceOK() |
|
157 | { |
|
@@ 156-173 (lines=18) @@ | ||
153 | $this->assertNotEquals($unwanted2, $actual); |
|
154 | } |
|
155 | ||
156 | public function testIsObjectWithBadRuntimeServiceOK() |
|
157 | { |
|
158 | $unwanted = "Data service type cannot be null"; |
|
159 | $unwanted2 = "Version cannot be null or empty"; |
|
160 | $actual = null; |
|
161 | $runtime = m::mock(TRuntimeType::class); |
|
162 | $runtime->shouldReceive('isOK')->andReturn(true, false)->twice(); |
|
163 | $dataServiceType = m::mock(TDataServicesType::class); |
|
164 | $dataServiceType->shouldReceive('isOK')->andReturn(true)->once(); |
|
165 | $foo = new TEdmxType(); |
|
166 | $foo->setVersion("1.5"); |
|
167 | $foo->setDataServiceType($dataServiceType); |
|
168 | $foo->setRuntime($runtime); |
|
169 | ||
170 | $this->assertFalse($foo->isOK($actual)); |
|
171 | $this->assertNotEquals($unwanted, $actual); |
|
172 | $this->assertNotEquals($unwanted2, $actual); |
|
173 | } |
|
174 | } |
|
175 |