title: Codeception "ErrorException array to string conversion" with Laravel and Lang::get()
body: <p>I've already opened an issue on <a href="https://github.com/Codeception/Codeception/issues/1087" rel="nofollow">Codeception Github Repository</a> so if you want to stay update on there you're welcome.</p>
  
  <p>By the way I'll explain my problem even here, maybe someone has got the solution.</p>
  
  <p>Basically when you write a functional test in Codeception with the Laravel4 module it seems that you cannot "parse" any kind of view with the <code>Lang::get()</code> statement or the <code>trans()</code> helper inside it (both do the same job).</p>
  
  <p>For example this</p>
  
  <pre><code>@extends('layout.main')
  
  @section('container')
  &lt;div&gt;
   {{ Lang::get('path.to.lang.file') }}
  &lt;/div&gt;
  @stop
  </code></pre>
  
  <p>Will raise an exception if you try to test with codeception. I found this bug with a simple registration form built with Bootstrap (for CSS and stuff) and with the use of <code>Lang::get()</code> for the localization, this future web app must be multilanguage so I need it.</p>
  
  <p>I paste the full stack error here but you can find it even on the issue link.</p>
  
  <pre><code>1) Failed to edit a bunch of data from an actual company in LoginAndEditDataCept (/Users
  
  /Ludo237/Projects/L4/app/tests/functional/LoginAndEditDataCept.php)
  Can't be on page "/auth/login":
  ErrorException: Array to string conversion (View: /Users/Ludo237/Project/L4/app/views/public/auth/login.blade.php)
  
  Scenario Steps:
  2. I am on page "/auth/login"
  1. As a An authenticated user
  
  
    [ErrorException] Array to string conversion (View: /Users/Ludo237/Projects/L4/app/views/public/auth/login.blade.php)  
  
  #0 /Users/Ludo237/Projects/L4/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(41): Illuminate\View\Engines\CompilerEngine-&gt;handleViewException(Object(ErrorException))
  #1 /Users/Ludo237/Projects/L4/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(56): Illuminate\View\Engines\PhpEngine-&gt;evaluatePath('/Users/Ludo237/...', Array)
  #2 /Users/Ludo237/Projects/L4/vendor/laravel/framework/src/Illuminate/View/View.php(134): Illuminate\View\Engines\CompilerEngine-&gt;get('/Users/Ludo237/...', Array)
  #3 /Users/Ludo237/Projects/L4/vendor/laravel/framework/src/Illuminate/View/View.php(102): Illuminate\View\View-&gt;getContents()
  #4 /Users/Ludo237/Projects/L4/vendor/laravel/framework/src/Illuminate/View/View.php(76): Illuminate\View\View-&gt;renderContents()
  #5 /Users/Ludo237/Projects/L4/vendor/laravel/framework/src/Illuminate/Http/Response.php(43): Illuminate\View\View-&gt;render()
  #6 /Users/Ludo237/Projects/L4/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php(202): Illuminate\Http\Response-&gt;setContent(Object(Illuminate\View\View))
  #7 /Users/Ludo237/Projects/L4/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1437): Symfony\Component\HttpFoundation\Response-&gt;__construct(Object(Illuminate\View\View))
  #8 /Users/Ludo237/Projects/L4/vendor/laravel/framework/src/Illuminate/Routing/Router.php(999): Illuminate\Routing\Router-&gt;prepareResponse(Object(Illuminate\Http\Request), Object(Illuminate\View\View))
  #9 /Users/Ludo237/Projects/L4/vendor/laravel/framework/src/Illuminate/Routing/Router.php(964): Illuminate\Routing\Router-&gt;dispatchToRoute(Object(Illuminate\Http\Request))
  #10 /Users/Ludo237/Projects/L4/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(738): Illuminate\Routing\Router-&gt;dispatch(Object(Illuminate\Http\Request))
  #11 /Users/Ludo237/Projects/L4/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(708): Illuminate\Foundation\Application-&gt;dispatch(Object(Illuminate\Http\Request))
  #12 /Users/Ludo237/Projects/L4/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Client.php(81): Illuminate\Foundation\Application-&gt;handle(Object(Illuminate\Http\Request))
  #13 /Users/Ludo237/Projects/L4/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Client.php(332): Symfony\Component\HttpKernel\Client-&gt;doRequest(Object(Illuminate\Http\Request))
  #14 /Users/Ludo237/Projects/L4/vendor/codeception/codeception/src/Codeception/Lib/InnerBrowser.php(68): Symfony\Component\BrowserKit\Client-&gt;request('GET', '/auth/login')
  #15 [internal function]: Codeception\Lib\InnerBrowser-&gt;amOnPage('/auth/login')
  #16 /Users/Ludo237/Projects/L4/vendor/codeception/codeception/src/Codeception/Step.php(125): call_user_func_array(Array, Array)
  #17 /Users/Ludo237/Projects/L4/vendor/codeception/codeception/src/Codeception/TestCase/Shared/Actor.php(67): Codeception\Step-&gt;run()
  #18 /Users/Ludo237/Projects/L4/vendor/codeception/codeception/src/Codeception/Scenario.php(93): Codeception\TestCase\Cept-&gt;runStep(Object(Codeception\Step\Condition))
  #19 /Users/Ludo237/Projects/L4/app/tests/functional/FunctionalTester.php(523): Codeception\Scenario-&gt;runStep(Object(Codeception\Step\Condition))
  #20 /Users/Ludo237/Projects/L4/app/tests/functional/LoginAndEditACompanyDataCept.php(7): FunctionalTester-&gt;amOnPage('/auth/login')
  #21 /Users/Ludo237/Projects/L4/vendor/codeception/codeception/src/Codeception/TestCase/Cept.php(64): require('/Users/Ludo237/...')
  #22 [internal function]: Codeception\TestCase\Cept-&gt;testCodecept()
  #23 /Users/Ludo237/Projects/L4/vendor/phpunit/phpunit/src/Framework/TestCase.php(951): ReflectionMethod-&gt;invokeArgs(Object(Codeception\TestCase\Cept), Array)
  #24 /Users/Ludo237/Projects/L4/vendor/phpunit/phpunit/src/Framework/TestCase.php(817): PHPUnit_Framework_TestCase-&gt;runTest()
  #25 /Users/Ludo237/Projects/L4/vendor/phpunit/phpunit/src/Framework/TestResult.php(686): PHPUnit_Framework_TestCase-&gt;runBare()
  #26 /Users/Ludo237/Projects/L4/vendor/phpunit/phpunit/src/Framework/TestCase.php(753): PHPUnit_Framework_TestResult-&gt;run(Object(Codeception\TestCase\Cept))
  #27 /Users/Ludo237/Projects/L4/vendor/phpunit/phpunit/src/Framework/TestSuite.php(675): PHPUnit_Framework_TestCase-&gt;run(Object(PHPUnit_Framework_TestResult))
  #28 /Users/Ludo237/Projects/L4/vendor/codeception/codeception/src/Codeception/PHPUnit/Runner.php(100): PHPUnit_Framework_TestSuite-&gt;run(Object(PHPUnit_Framework_TestResult))
  #29 /Users/Ludo237/Projects/L4/vendor/codeception/codeception/src/Codeception/SuiteManager.php(153): Codeception\PHPUnit\Runner-&gt;doEnhancedRun(Object(PHPUnit_Framework_TestSuite), Object(PHPUnit_Framework_TestResult), Array)
  #30 /Users/Ludo237/Projects/L4/vendor/codeception/codeception/src/Codeception/Codecept.php(162): Codeception\SuiteManager-&gt;run(Object(Codeception\PHPUnit\Runner), Object(PHPUnit_Framework_TestResult), Array)
  #31 /Users/Ludo237/Projects/L4/vendor/codeception/codeception/src/Codeception/Codecept.php(145): Codeception\Codecept-&gt;runSuite(Array, 'functional', 'LoginAndEditACo...')
  #32 /Users/Ludo237/Projects/L4/vendor/codeception/codeception/src/Codeception/Command/Run.php(149): Codeception\Codecept-&gt;run('functional', 'LoginAndEditACo...')
  #33 /Users/Ludo237/Projects/L4/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(252): Codeception\Command\Run-&gt;execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
  #34 /Users/Ludo237/Projects/L4/vendor/symfony/console/Symfony/Component/Console/Application.php(887): Symfony\Component\Console\Command\Command-&gt;run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
  #35 /Users/Ludo237/Projects/L4/vendor/symfony/console/Symfony/Component/Console/Application.php(193): Symfony\Component\Console\Application-&gt;doRunCommand(Object(Codeception\Command\Run), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
  #36 /Users/Ludo237/Projects/L4/vendor/symfony/console/Symfony/Component/Console/Application.php(124): Symfony\Component\Console\Application-&gt;doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
  #37 /Users/Ludo237/Projects/L4/vendor/codeception/codeception/codecept(27): Symfony\Component\Console\Application-&gt;run()
  #38 {main}
  </code></pre>
  
  <p>This is the file used by <code>login.blade.php</code> is very very very simple and it is located under <code>app/lang/en/common.php</code></p>
  
  <pre><code>  &lt;?php
  
  return [
  
      /*
      |--------------------------------------------------------------------------
      | Common Language Lines
      |--------------------------------------------------------------------------
      |
      |
      */
  
      'date' =&gt; [
          'days' =&gt; [
              '1' =&gt; 'Monday',
              '2' =&gt; 'Tuesday',
              '3' =&gt; 'Wednesday',
              '4' =&gt; 'Thursday',
              '5' =&gt; 'Friday',
              '6' =&gt; 'Saturday',
              '7' =&gt; 'Sunday'
          ],
      ]
  
  ];
  </code></pre>
  
  <p>And this is the <code>login.blade.php</code> part that use the lang file. </p>
  
  <pre><code>&lt;div class="row"&gt;
  &lt;div class="auth-box col-xs-12 col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2"&gt;
      &lt;div class="panel panel-default"&gt;
          &lt;div class="panel-heading"&gt;
              &lt;div class="panel-title"&gt;{{ trans('common.date.days.1') }}&lt;/div&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>Is there anyone who solved this trouble? </p>