77 *
88 * For the full copyright and license information, please view the LICENSE
99 * file that was distributed with this source code.
10+ *
1011 */
1112
1213namespace spec \PHPCR \Shell \Config ;
1314
14- use PhpSpec \ObjectBehavior ;
15- use Prophecy \Argument ;
1615use PHPCR \Shell \Config \ConfigManager ;
1716use PHPCR \Shell \Config \Profile ;
17+ use PhpSpec \ObjectBehavior ;
18+ use Prophecy \Argument ;
1819use Symfony \Component \Filesystem \Filesystem ;
1920
2021class ProfileLoaderSpec extends ObjectBehavior
2122{
2223 public function let (
2324 ConfigManager $ configManager ,
2425 Filesystem $ filesystem
25- )
26- {
26+ ) {
2727 $ configManager ->getConfigDir ()->willReturn (__DIR__ );
2828 $ this ->beConstructedWith ($ configManager , $ filesystem );
2929 }
@@ -35,49 +35,47 @@ public function it_is_initializable()
3535
3636 public function it_should_list_profile_names ()
3737 {
38- $ this ->getProfileNames ()->shouldReturn (array (
39- 'one ' , 'two '
40- ) );
38+ $ this ->getProfileNames ()->shouldReturn ([
39+ 'one ' , 'two ' ,
40+ ] );
4141 }
4242
4343 public function it_should_load_data_into_a_given_profile (
4444 Profile $ profile ,
4545 Filesystem $ filesystem
46- )
47- {
46+ ) {
4847 $ profile ->get ('phpcr ' , 'workspace ' )->willReturn ('default ' );
4948 $ profile ->getName ()->willReturn ('one ' );
50- $ profile ->set ('transport ' , array (
51- 'name ' => 'foobar ' ,
49+ $ profile ->set ('transport ' , [
50+ 'name ' => 'foobar ' ,
5251 'bar_foo ' => 'barfoo ' ,
5352 'foo_bar ' => 'foobar ' ,
54- ) )->shouldBeCalled ();
55- $ profile ->set ('phpcr ' , array (
56- 'username ' => 'username ' ,
57- 'password ' => 'password ' ,
53+ ] )->shouldBeCalled ();
54+ $ profile ->set ('phpcr ' , [
55+ 'username ' => 'username ' ,
56+ 'password ' => 'password ' ,
5857 'workspace ' => 'default ' ,
59- ) )->shouldBeCalled ();
58+ ] )->shouldBeCalled ();
6059
6160 $ this ->loadProfile ($ profile );
6261 }
6362
6463 public function it_should_save_a_given_profile (
6564 Profile $ profile ,
6665 Filesystem $ filesystem
67- )
68- {
66+ ) {
6967 $ profile ->getName ()->willReturn ('newprofile ' );
70- $ profile ->toArray ()->willReturn (array (
71- 'transport ' => array (
72- 'name ' => 'test_transport ' ,
68+ $ profile ->toArray ()->willReturn ([
69+ 'transport ' => [
70+ 'name ' => 'test_transport ' ,
7371 'option1 ' => 'value1 ' ,
74- ) ,
75- 'phpcr ' => array (
72+ ] ,
73+ 'phpcr ' => [
7674 'username ' => 'daniel ' ,
7775 'password ' => 'leech ' ,
78- ) ,
79- ) );
80- $ filesystem ->dumpFile (Argument::type ('string ' ), <<<EOT
76+ ] ,
77+ ] );
78+ $ filesystem ->dumpFile (Argument::type ('string ' ), <<<' EOT'
8179transport:
8280 name: test_transport
8381 option1: value1
0 commit comments