@@ -113,10 +113,14 @@ public function endTest() {
113
113
/**
114
114
* test ListAll
115
115
*
116
- * @fixme this one has problems with test suites
117
116
* @return void
118
117
*/
119
118
public function testListAll () {
119
+ $ count = count ($ this ->Task ->listAll ('test_suite ' ));
120
+ if ($ count != count ($ this ->fixtures )) {
121
+ $ this ->markTestSkipped ('Additional tables detected. ' );
122
+ }
123
+
120
124
$ this ->Task ->connection = 'test_suite ' ;
121
125
$ this ->Task ->interactive = true ;
122
126
$ this ->Task ->expects ($ this ->at (1 ))->method ('out ' )->with ('1. BakeArticles ' );
@@ -138,17 +142,21 @@ public function testListAll() {
138
142
/**
139
143
* Test that getName interacts with the user and returns the controller name.
140
144
*
141
- * @fixme this one has problems with test suites
142
145
* @return void
143
146
*/
144
147
public function testGetNameValidIndex () {
148
+ $ count = count ($ this ->Task ->listAll ('test_suite ' ));
149
+ if ($ count != count ($ this ->fixtures )) {
150
+ $ this ->markTestSkipped ('Additional tables detected. ' );
151
+ }
145
152
$ this ->Task ->interactive = true ;
146
153
$ this ->Task ->expects ($ this ->at (5 ))->method ('in ' )->will ($ this ->returnValue (3 ));
154
+ $ this ->Task ->expects ($ this ->at (7 ))->method ('in ' )->will ($ this ->returnValue (1 ));
155
+
147
156
$ result = $ this ->Task ->getName ('test_suite ' );
148
157
$ expected = 'BakeComments ' ;
149
158
$ this ->assertEqual ($ result , $ expected );
150
-
151
- $ this ->Task ->expects ($ this ->at (7 ))->method ('in ' )->will ($ this ->returnValue (1 ));
159
+
152
160
$ result = $ this ->Task ->getName ('test_suite ' );
153
161
$ expected = 'BakeArticles ' ;
154
162
$ this ->assertEqual ($ result , $ expected );
@@ -157,13 +165,13 @@ public function testGetNameValidIndex() {
157
165
/**
158
166
* test getting invalid indexes.
159
167
*
160
- * @fixme this one has problems with test suites
161
168
* @return void
162
169
*/
163
170
function testGetNameInvalidIndex () {
164
171
$ this ->Task ->interactive = true ;
165
- $ this ->Task ->expects ($ this ->at (5 ))->method ('in ' )->will ($ this ->returnValue (10 ));
166
- $ this ->Task ->expects ($ this ->at (7 ))->method ('in ' )->will ($ this ->returnValue ('q ' ));
172
+ $ this ->Task ->expects ($ this ->any ())->method ('in ' )
173
+ ->will ($ this ->onConsecutiveCalls (50 , 'q ' ));
174
+
167
175
$ this ->Task ->expects ($ this ->once ())->method ('err ' );
168
176
$ this ->Task ->expects ($ this ->once ())->method ('_stop ' );
169
177
@@ -421,10 +429,14 @@ public function testBakeTest() {
421
429
/**
422
430
* test Interactive mode.
423
431
*
424
- * @fixme this one has problems with test suites
425
432
* @return void
426
433
*/
427
434
public function testInteractive () {
435
+ $ count = count ($ this ->Task ->listAll ('test_suite ' ));
436
+ if ($ count != count ($ this ->fixtures )) {
437
+ $ this ->markTestSkipped ('Additional tables detected. ' );
438
+ }
439
+
428
440
$ this ->Task ->connection = 'test_suite ' ;
429
441
$ this ->Task ->path = '/my/path/ ' ;
430
442
@@ -452,10 +464,14 @@ public function testInteractive() {
452
464
/**
453
465
* test Interactive mode.
454
466
*
455
- * @fixme this one has problems with test suites
456
467
* @return void
457
468
*/
458
469
function testInteractiveAdminMethodsNotInteractive () {
470
+ $ count = count ($ this ->Task ->listAll ('test_suite ' ));
471
+ if ($ count != count ($ this ->fixtures )) {
472
+ $ this ->markTestSkipped ('Additional tables detected. ' );
473
+ }
474
+
459
475
$ this ->Task ->connection = 'test_suite ' ;
460
476
$ this ->Task ->interactive = true ;
461
477
$ this ->Task ->path = '/my/path/ ' ;
0 commit comments