Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ignore the remaining errors.

They are just part of the test to compare objects + arrays.
No need to cause standards errors.
  • Loading branch information...
commit edd54e4ddf89325018cd05386bdec42562fd5797 1 parent 091ad53
@markstory markstory authored
Showing with 19 additions and 5 deletions.
  1. +19 −5 lib/Cake/Test/Case/Utility/SetTest.php
View
24 lib/Cake/Test/Case/Utility/SetTest.php
@@ -2190,6 +2190,7 @@ public function testMapReverse() {
array('id' => 1, 'article_id' => 1, 'user_id' => 1, 'comment' => 'First Comment for First Article', 'published' => 'Y', 'created' => '2007-03-18 10:47:23', 'updated' => '2007-03-18 10:49:31'),
array('id' => 2, 'article_id' => 1, 'user_id' => 2, 'comment' => 'Second Comment for First Article', 'published' => 'Y', 'created' => '2007-03-18 10:47:23', 'updated' => '2007-03-18 10:49:31'))));
+ // @codingStandardsIgnoreStart
$class = new stdClass;
$class->User = new stdClass;
$class->User->psword = 'whatever';
@@ -2215,6 +2216,7 @@ public function testMapReverse() {
$comment2->published = 'Y';
$comment2->created = '2007-03-18 10:47:23';
$comment2->updated = '2007-03-18 10:49:31';
+ // @codingStandardsIgnoreEnd
$class->User->Comment = array($comment, $comment2);
$result = Set::reverse($class);
$this->assertEquals($expected, $result);
@@ -2234,6 +2236,7 @@ public function testMapReverse() {
);
$this->assertEquals($expected, $result);
+ // @codingStandardsIgnoreStart
$class = new stdClass;
$class->User = new stdClass;
$class->User->id = 100;
@@ -2241,6 +2244,7 @@ public function testMapReverse() {
$class->Profile = new stdClass;
$class->Profile->name = 'Joe Mamma';
$class->Profile->_name_ = 'Profile';
+ // @codingStandardsIgnoreEnd
$result = Set::reverse($class);
$expected = array('User' => array('id' => '100'), 'Profile' => array('name' => 'Joe Mamma'));
@@ -2469,6 +2473,7 @@ public function testMapNesting() {
);
$mapped = Set::map($data);
+ // @codingStandardsIgnoreStart
$expected = new stdClass();
$expected->_name_ = 'IndexedPage';
$expected->id = 2;
@@ -2478,6 +2483,7 @@ public function testMapNesting() {
$expected->redirect = '';
$expected->created = "1195055503";
$expected->updated = "1195055503";
+ // @codingStandardsIgnoreEnd
$this->assertEquals($mapped[1], $expected);
$ids = array();
@@ -2509,6 +2515,7 @@ public function testNestedMappedData() {
)
));
+ // @codingStandardsIgnoreStart
$expected = new stdClass;
$expected->_name_ = 'Post';
$expected->id = '1';
@@ -2546,6 +2553,7 @@ public function testNestedMappedData() {
$expected2->Author->updated = "2007-03-17 01:22:31";
$expected2->Author->test = "working";
$expected2->Author->_name_ = 'Author';
+ // @codingStandardsIgnoreEnd
$test = array();
$test[0] = $expected;
@@ -2554,11 +2562,12 @@ public function testNestedMappedData() {
$this->assertEquals($test, $result);
$result = Set::map(
- array(
- 'Post' => array('id' => '1', 'author_id' => '1', 'title' => 'First Post', 'body' => 'First Post Body', 'published' => 'Y', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'),
- 'Author' => array('id' => '1', 'user' => 'mariano', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:16:23', 'updated' => '2007-03-17 01:18:31', 'test' => 'working'),
- )
- );
+ array(
+ 'Post' => array('id' => '1', 'author_id' => '1', 'title' => 'First Post', 'body' => 'First Post Body', 'published' => 'Y', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'),
+ 'Author' => array('id' => '1', 'user' => 'mariano', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:16:23', 'updated' => '2007-03-17 01:18:31', 'test' => 'working'),
+ )
+ );
+ // @codingStandardsIgnoreStart
$expected = new stdClass;
$expected->_name_ = 'Post';
$expected->id = '1';
@@ -2577,6 +2586,7 @@ public function testNestedMappedData() {
$expected->Author->updated = "2007-03-17 01:18:31";
$expected->Author->test = "working";
$expected->Author->_name_ = 'Author';
+ // @codingStandardsIgnoreEnd
$this->assertEquals($expected, $result);
//Case where extra HABTM fields come back in a result
@@ -2617,6 +2627,7 @@ public function testNestedMappedData() {
$result = Set::map($data);
+ // @codingStandardsIgnoreStart
$expected = new stdClass();
$expected->_name_ = 'User';
$expected->id = 1;
@@ -2653,6 +2664,7 @@ public function testNestedMappedData() {
$piece2->PiecesUser->_name_ = 'PiecesUser';
$piece2->_name_ = 'Piece';
+ // @codingStandardsIgnoreEnd
$expected->Piece = array($piece, $piece2);
@@ -2701,6 +2713,7 @@ public function testNestedMappedData() {
$result = Set::map($data);
+ // @codingStandardsIgnoreStart
$expected = new stdClass();
$expected->_name_ = 'FooUser';
$expected->id = 1;
@@ -2733,6 +2746,7 @@ public function testNestedMappedData() {
$piece2->PiecesUser->piece_id = 2;
$piece2->PiecesUser->user_id = 2;
$piece2->PiecesUser->_name_ = 'FooPiecesUser';
+ // @codingStandardsIgnoreEnd
$expected->Piece = array($piece, $piece2);
Please sign in to comment.
Something went wrong with that request. Please try again.