Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorpixel-boutique.de
     
    Hi together,

    wanted to try that unit test with the blog-sreencast (everything of the screencast is running on my local windows with xampp php 5.2.2)
    But I am getting tons of messages, could anyone check for me, if I did a misconfiguration or why its not similar to the screencast?

    Big thanks for your help,
    Chris
    •  
      CommentAuthorbermi
     

    Chris,

    It seems that you are running the tests Akelos Framework core unit tests. Not you application tests.

    What command are you using run the tests?

    It is possible that you're using a non-linked application in which case all the core unit test are included and executed. Although I do not have a windows box to check your situation right now, if you provide us with more details of your setting Salavert might be able to assist you on running the unit tests for your app on windows.

    • CommentAuthorpixel-boutique.de
     
    hm, I have the core installed at C:\xampp\htdocs\akelos
    and the booklink app in C:\xampp\htdocs\booklink

    i navigate to C:\xampp\htdocs\booklink
    and enter C\xampp\php\php script/test unit

    it runs into C:\xampp\htdocs\test\unit.php
    when I print_r the $test var before invocation of load_tests(AK_TEST_DIR.DS.'unit'.DS.'lib', $test);
    it says:

    GroupTest Object
    (
    [_label] => Unit tests for the Akelos Framework
    [_test_cases] => Array
    (
    )

    [_old_track_errors] =>
    [_xdebug_is_enabled] =>
    )

    when i echo AK_TEST_DIR.DS.'unit'.DS.'lib';
    it says C:\xampp\htdocs\booklink\test\unit\lib

    aha, I changed it to AK_TEST_DIR.DS.'unit'.DS.'app';
    And "huups" - it works!!!

    But look, I did use your booklink\installers\comment_installer.php
    and the script/test unit
    shows an error (I do not get that error with the script/migrate comment)

    Unit tests for the Akelos Framework

    Fatal error: Call to a member function create() on a non-object in C:\xampp\htdocs\booklink\app\installers\comment_installer.php on line 17

    on line 17 in the comment migration i have
    $Post->comment->create(array('body' => 'I like Gaudis buildings'));


    Thanks & Akelos seems to be fun (and your php coding style is really pure aesthetic :)
    Bye,
    Chris
    • CommentAuthorraslam
     

    Bermi,

    need some help in testing. I have a Member model and I'm trying to test it. I have a model method authenticateUser for checking login/password and returns false or found user.

    I have a User controller which has method setPassword. While creating a member I create a password and salt throught it.

    The above is just a briefing for what i'm doing. I am attaching the three files: 1) User contorller 2) Member model 3) member test case.

    Please take look and adivse.

    •  
      CommentAuthorbermi
     

    raslam,

    You are using

     Member::setPassword
    

    when you implemented the setPassword in your UserController and not in the Member model.

    You should implement the UserController::setPassword as Member::setPassword