Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-mongodb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
laravel-mongodb
Commits
a7f5d527
Commit
a7f5d527
authored
Mar 17, 2018
by
Hamid Alaei V
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tests: assertObjectNotHasAttribute cannot test magic attributes (__get)
parent
7445ea6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ModelTest.php
tests/ModelTest.php
+4
-4
No files found.
tests/ModelTest.php
View file @
a7f5d527
...
@@ -352,7 +352,7 @@ class ModelTest extends TestCase
...
@@ -352,7 +352,7 @@ class ModelTest extends TestCase
$user1
->
unset
(
'note1'
);
$user1
->
unset
(
'note1'
);
$this
->
assert
ObjectNotHasAttribute
(
'note1'
,
$user1
);
$this
->
assert
False
(
isset
(
$user1
->
note1
)
);
$this
->
assertTrue
(
isset
(
$user1
->
note2
));
$this
->
assertTrue
(
isset
(
$user1
->
note2
));
$this
->
assertTrue
(
isset
(
$user2
->
note1
));
$this
->
assertTrue
(
isset
(
$user2
->
note1
));
$this
->
assertTrue
(
isset
(
$user2
->
note2
));
$this
->
assertTrue
(
isset
(
$user2
->
note2
));
...
@@ -361,15 +361,15 @@ class ModelTest extends TestCase
...
@@ -361,15 +361,15 @@ class ModelTest extends TestCase
$user1
=
User
::
find
(
$user1
->
_id
);
$user1
=
User
::
find
(
$user1
->
_id
);
$user2
=
User
::
find
(
$user2
->
_id
);
$user2
=
User
::
find
(
$user2
->
_id
);
$this
->
assert
ObjectNotHasAttribute
(
'note1'
,
$user1
);
$this
->
assert
False
(
isset
(
$user1
->
note1
)
);
$this
->
assertTrue
(
isset
(
$user1
->
note2
));
$this
->
assertTrue
(
isset
(
$user1
->
note2
));
$this
->
assertTrue
(
isset
(
$user2
->
note1
));
$this
->
assertTrue
(
isset
(
$user2
->
note1
));
$this
->
assertTrue
(
isset
(
$user2
->
note2
));
$this
->
assertTrue
(
isset
(
$user2
->
note2
));
$user2
->
unset
([
'note1'
,
'note2'
]);
$user2
->
unset
([
'note1'
,
'note2'
]);
$this
->
assert
ObjectNotHasAttribute
(
'note1'
,
$user2
);
$this
->
assert
False
(
isset
(
$user2
->
note1
)
);
$this
->
assert
ObjectNotHasAttribute
(
'note2'
,
$user2
);
$this
->
assert
False
(
isset
(
$user2
->
note2
)
);
}
}
public
function
testDates
()
public
function
testDates
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment