File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
magento/app/code/local/Crowd/Helloworld/Block
spec/app/code/local/Crowd/Helloworld/Block Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
class Crowd_Helloworld_Block_Message extends Mage_Core_Block_Abstract
4
4
{
5
+
5
6
private $ _stateAdapter ;
6
7
7
8
public function __construct (array $ services = array ()){
@@ -14,14 +15,12 @@ public function __construct(array $services = array()){
14
15
}
15
16
16
17
public function message (){
17
-
18
18
$ state = $ this ->_stateAdapter ;
19
19
20
20
if ($ state ->isLoggedIn ()){
21
21
return 'Hello registered user ' ;
22
22
} else {
23
23
return 'Hello guest, Please register with us for special offers ' ;
24
24
}
25
-
26
25
}
27
- }
26
+ }
Original file line number Diff line number Diff line change @@ -17,8 +17,7 @@ function it_is_initializable()
17
17
$ this ->shouldHaveType ('Crowd_Helloworld_Block_Message ' );
18
18
}
19
19
20
- function it_should_tell_you_that_you_most_register ($ adapter )
21
- {
20
+ function it_should_tell_you_that_you_must_be_registered ($ adapter ){
22
21
$ adapter ->isLoggedIn ()->willReturn (false );
23
22
$ this ->message ()->shouldReturn ('Hello guest, Please register with us for special offers ' );
24
23
}
You can’t perform that action at this time.
0 commit comments