TS 74 PHP Composer Support

PHP Composer Support Test Specification for NetBeans 7.4

Author: Milan Molda
Original Author: Martin Kanak
Version: 1.1
Last Update: 25th July 2013
Introduction: This specification provides testcases for Composer Support for PHP editor in the NetBeans IDE

Mac OS specific details: To find Options on MacOS, go to Netbeans menu -> Preferences

Contents


Test suite: Composer Basic Support

Setup: Composer is installed and configured.

  1. Verify Composer Init
    1. In the Projects window, choose File > New Project.
    2. In the Categories list, select PHP. In the Projects area, choose PHP Application to create an empty project and click Next.
    3. Accept default values for Name and Location step. Press Finish button.
    4. Right click on project and select Composer > Init
    • EXPECTED RESULT: composer.json file was generated.
  2. Verify Composer Install

File:Composer_install.png

    1. Prerequisity: Project with generated composer.json file (from testcase no.1 Verify Composer Init)
    2. Open the composer.json file
    3. Delete all code from this file and insert the following code:
{
    "require": {
        "monolog/monolog": "1.0.*"
    }
}
    1. Save composer.json file after inserting code
    2. Right click on project and select Composer > Install
    • EXPECTED RESULT: You can see output which is similar to the one on screenshot.
  1. Verify Composer Update

File:Composer_update.png

    1. Prerequisity: Project from testcase no.2 Verify Composer Install
    2. Open the composer.json file
    3. Delete the line with "monolog/monolog": "1.0.*", so now you have this code in source of composer.json:
{
    "require": {
        
    }
}
    1. Save composer.json file
    2. Right click on project and select Composer > Update
    • EXPECTED RESULT: You can see output which is similar to the one on screenshot.
  1. Verify Composer Validate

File:Composer_validate1.png

    1. In the Projects window, choose File > New Project.
    2. In the Categories list, select PHP. In the Projects area, choose PHP Application to create an empty project and click Next.
    3. Accept default values for Name and Location step. Press Finish button.
    4. Right click on project and select Composer > Init
    5. composer.json file was generated
    6. Right click on project and select Composer > Validate
    • EXPECTED RESULT: You can see output which is similar to the one on screenshot.
  1. Verify Composer Validate - continue

File:Composer_validate2.png

    1. Now delete the second line from composer.json file (on this line there should be something like this "name": "vendor/php-project1", -> so delete it)
    2. Save composer.json file
    3. Again right click on project and select Composer > Validate
    • EXPECTED RESULT: You can see output which is similar to the one on screenshot.
  1. Verify Adding dependencies via Composer

File:Php-composer-dependencies.png

    1. Create a new or use existing PHP project.
    2. Right click on project name and select Compose -> Init, to create composer.json file.
    3. Right click on project name and select Composer -> Add Dependency.
    4. Search and select appropriate package, choose the version and click Require.
    • EXPECTED RESULT: Dependency is added into composer.json and the result is displayed in Output window.
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo