File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ public function __construct($data = null) {
84
84
&& isset ($ data ->category_name )
85
85
&& isset ($ data ->body )
86
86
&& isset ($ data ->url )
87
- && isset ($ data ->price )
88
87
&& isset ($ data ->images )
89
88
&& isset ($ data ->location )
90
89
&& isset ($ data ->owner )
Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ public function testGetAnnoncesOnlyParticuliers() {
36
36
$ finds = 0 ;
37
37
/* @var $annonce \Absmoca\Annonce */
38
38
foreach ($ annonces ->annonces as $ annonce ) {
39
- if ($ annonce ->getOwner ()["type " ] == "pro " ) $ finds =+ 1 ;
39
+ $ owner = $ annonce ->getOwner ();
40
+ if (!isset ($ owner ["type " ]) || $ owner ["type " ] == "pro " ) $ finds ++;
40
41
}
41
42
$ this ->assertEquals (0 , $ finds );
42
43
}
@@ -51,7 +52,8 @@ public function testGetAnnoncesOnlyPro() {
51
52
$ finds = 0 ;
52
53
/* @var $annonce \Absmoca\Annonce */
53
54
foreach ($ annonces ->annonces as $ annonce ) {
54
- if ($ annonce ->getOwner ()["type " ] == "private " ) $ finds =+ 1 ;
55
+ $ owner = $ annonce ->getOwner ();
56
+ if (!isset ($ owner ["type " ]) || $ owner ["type " ] == "private " ) $ finds ++;
55
57
}
56
58
$ this ->assertEquals (0 , $ finds );
57
59
}
You can’t perform that action at this time.
0 commit comments