| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function testExceptionThrownOnBeforeWrite() |
||
| 30 | { |
||
| 31 | $member = $this->objFromFixture('Member', 'admin'); |
||
| 32 | $this->session()->inst_set('loggedInAs', $member->ID); |
||
| 33 | $fixture = $this->objFromFixture('JSONTextTestPage', 'jsontext-text'); |
||
| 34 | |||
| 35 | $this->setExpectedException('\JSONText\Exceptions\JSONTextException', "FooField doesn't exist in POST data."); |
||
| 36 | |||
| 37 | $response = $this->post('admin/pages/edit/EditForm', [ |
||
| 38 | 'Title' => 'Dummy', |
||
| 39 | 'URLSegment' => 'dummy', |
||
| 40 | 'action_save' => 1, |
||
| 41 | 'ID' => 44, |
||
| 42 | 'ParentID' => 1, |
||
| 43 | ]); |
||
| 44 | } |
||
| 45 | } |
||
| 58 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.