Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8586435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:18:35+00:00 2026-06-11T22:18:35+00:00

I,m doing a tutorial application with yii framework. When I tried to run an

  • 0

I,m doing a tutorial application with yii framework. When I tried to run an unit test I got this error in command line

Parse error: syntax error, unexpected T_DOUBLE_ARROW in /Applications/MAMP/htdocs/trackstar/protected/tests/unit/ProjectTest.php on line 11

Here is my code. I didn’t find the problem in my code . Can anyone help ?

class ProjectTest extends CDbTestCase
{
    public function testCRUD()
    {
        //Create a new project
        $newProject=new Project;
        $newProjectName = 'Test Project 1';
        $newProject->setAttributes(
                array(
                'name' => $newProjectName,
                'description' => 'Test project number one',
                'create_time' => '2010-01-01 00:00:00',
                'create_user_id' => 1,
                'update_time' => '2010-01-01 00:00:00',
                'update_user_id' => 1,
                )
                );
                $this->assertTrue($newProject->save(false));
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T22:18:36+00:00Added an answer on June 11, 2026 at 10:18 pm

    There’s some kind of an unprintable character before your “array” keyword, just delete that one and it will be working

    class ProjectTest extends CDbTestCase
    {
        public function testCRUD()
        {
            //Create a new project
            $newProject=new Project;
            $newProjectName = 'Test Project 1';
            $newProject->setAttributes(
                    array(
                    'name' => $newProjectName,
                    'description' => 'Test project number one',
                    'create_time' => '2010-01-01 00:00:00',
                    'create_user_id' => 1,
                    'update_time' => '2010-01-01 00:00:00',
                    'update_user_id' => 1,
                    )
                    );
                    $this->assertTrue($newProject->save(false));
        }
    }
    

    You won’t see the difference, but it’s there

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've followed this tutorial but when I try to run the application I get
I am doing this tutorial that would return the GPS coordinates. When I run
I'm doing this little tutorial: http://www.asp.net/mvc/videos/mvc-2/how-do-i/creating-a-tasklist-application-with-aspnet-mvc But somehow he's passing a string back to
I am doing a tutorial according to this article . This is basic Hello
I'm currently doing facebook integration and have gone through this tutorial . So far,
I'm doing this as part of a Java tutorial, so it is probably not
I'm doing a graph with Quartz, following this tutorial . This is my hard-coded
Sorry for stupid questions, I'm doing everything as described in this tutorial: http://www.functionx.com/visualc/howto/calldlgfromdlg.htm I
Doing the getting started of Sinatra. I get this error: ./sinatra.rb:5: undefined method `get'
I'm following the NerdDinner tutorial while building my own application. The tutorial gives this:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.