TS 67 PHP Projects

PHP Projects and Wizards Test Specification Test Specification for NetBeans 6.7

Author: Victoria Zhukovskaya, revision for 6.7 by Filip Zamboj
Version: 1.0
Last update: 10th October 2008
Introduction: This specification provides usecases of Php project creation, Php Project properties customizing and Php Project actions in the NetBeans

IDE

Contents


Test suite: Create a new Php Project

Purpose: Check the Wizard for creation empty Php Project.
Setup: PHP engine and Apache 2.2 are configured. Apache 2.2 is installed to default location.

  1. Create an empty Project with default settings.
    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.
    • EXPECTED RESULT: Created Php project appears on Project tab. index.php opens in the source view. Project Sources are located in htdocs directory

of Apache.

  1. Create empty Project with the given name
    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. Type Project Name myPhpProject. the rest fields use default values for Name and Location step, press Finish button.
    4. Repeat above steps for creating project with the same name.
    • EXPECTED RESULT: There should be the warning message: Source directory is already NetBeans project.
  2. Create empty Project with incorrect name
    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. For Name and Location step type Project Name myPhpProject*. Accept default values for the rest fields, press Cancel button.
    • EXPECTED RESULT: There should be warning message: Source directory is not a valid folder name.
  3. Create empty Project and put metadata into a separate directory
    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. Check "Put NetBeans metadata into a separate directory" checkbox. Accept default values for the rest fields, press Finish button.
    • EXPECTED RESULT: Created Php project appears on Project tab. Index.php opens in source view. Project Sources are located in the Source Folder and

metadata are located in a separate directory.

  1. Create empty Project with renamed index.php file
    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 the rest fields, press Finish button.
    4. Rename index.php Index File to myindex.php.
    5. Invoke Properties for this PHP Application. Slect Run Configuration on Properties window. Press "Browse..." button for index file. Select myondex.php

file. Press Select File button. Press OK.

    • EXPECTED RESULT: Created Php project appears on Project tab. Index file has new name myindex.php opens
  1. Create empty Project and choose copy location.
    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 the rest fields, press Next button.
    4. Set checkbox 'Copy files from Sources Folder to another location' on. Press Browse button and select path for copying. Press Finish button.
    • EXPECTED RESULT: Created Php project appears on Project tab. index.php opens in source view. Project Sources are located in the Sources Folder

and have a copy in Copy Location.

  1. Create empty Project and set copy location to the doc root.
    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. Select NetBeansProjects directory for the Sources Folder combobox. Accept default values for the rest fields, press Next button.
    4. Set checkbox 'Copy files from Sources Folder to another location' on. Select htdocs\PhpProjectN for the Copy to Folder combobox. Press Finish button.
    • EXPECTED RESULT: Created Php project appears on Project tab. index.php opens in source view. Project Sources are located in the Project Folder and have a copy in htdocs directory of Apache.


Test suite: Create Air Alliance Sample Application

Purpose: Create the sample and work with it.
Setup: PHP engine, Apache 2.2 and MySQL data base are configured. Apache 2.2 is installed to default location.

  1. Create Air Alliance Sample
    1. In the Projects window, choose File > New Project.
    2. In the Categories list, select Samples>PHP. In the Projects area. Choose Air Alliance Sample Application to create the sample. Press Next.
    3. Name of Project is AirAllianceN. Press Finish.
    4. Folow the instruction in the appeared readme.html.
    • EXPECTED RESULT: Created Air Alliance Sample appears on Project tab. There should be opened readme.html in default browser. Finally, we can run the project.


Test suite: Check Properties of PHP Project

Purpose: Check Properties of PHP Project
Setup: PHP engine, Apache 2.2 and MySQL data base are configured. Apache 2.2 is installed to default location.

  1. Check Properties of php Project with default settings.
    1. In the Projects window, choose File > New Project.
    2. In the Categories list, select PHP. In the Projects area, choose PHP Project to create an empty project and click Next.
    3. Accept default values for Name and Location step, press Finish button.
    4. Created Php project appears on Project tab. Right click on the project and select Properties.
    • EXPECTED RESULT: Project Properties window appears. There are six Categories: Sources,Run Configuration, PHP Include Path, JavaScript Libraries, Debug, Formatting.
  2. Check Properties of php Project with default settings.
    1. Create a PHP Project with default settings. (Source folder is htdocs folder of Apache, Copy folder is not specified.)
    2. Right click on the project and select Properties. Select Sources node in the Categories tree.
    3. Set check box 'Copy files from Sources Folder to another location' on. Expand combobox and select htdocs\PhpProjectN+1 folder. Press Ok button.
    • EXPECTED RESULT: Project has a copy of sources in Copy Location.


Test suite: PHP Project from remote server

Purpose: Create PHP Project with remote server; FTP
Setup: PHP engine, Apache 2.2 and MySQL data base are configured. Apache 2.2 is installed to default location.

  1. Create PHP Project from remote sources
    1. In the Projects window, choose File > New Project.
    2. In the Categories list, select PHP. In the Projects area, choose PHP Project from Remote Server
    3. Accept default values for Name
    4. set project url to your local folder
    5. select manage remote configuration
    6. use ftp connection
    7. enter credentials, see hw&os configuration for php testing server on Jupiter
    8. set initial directory to /var/www/PHPTesting/remoteConfigurationProject
    9. Created Php project appears on Project tab and sources will be downloaded
    • EXPECTED RESULT: sources are downloaded. You can see log. verify that data has been downloaded.
  2. Check Properties of php Project From Remote Server
    1. Right click on the project from previous testcase and select Properties.
    2. Select Run Configuration
    • EXPECTED RESULT: Verify that configuration matches to entries you entered before and upload files is set on save
  3. Create PHP Project with remote server, SFTP without public key
    1. repeat first testcase of this testsuite using sftp connection without providing public key
  4. Create PHP Project with remote server, SFTP with public key
    1. repeat first testcase of this testsuite using sftp connection and providing public key without passphrase
  5. Create PHP Project with remote server, SFTP with public key with passphrase and without password
    1. repeat first testcase of this testsuite using sftp connection and provide public key with passphrase and without password


Test suite: Symfony PHP Project

Purpose: Create PHP Project with remote server
Setup: Symfony, PHP engine, Apache 2.2 and MySQL data base are configured. Apache 2.2 is installed to default location, Windows & Linux OS
Note: How to install symfony is to be found here. Don't install yet

  1. Create New Symfony PHP Project
    1. In the Projects window, choose File > New Project.
    2. In the Categories list, select PHP. In the Projects area, choose PHP Project
    3. Accept default values for Name and Location
    4. press next
    5. enable Symfony PHP Web Framework
    6. accept default values
    • EXPECTED RESULT: verify that error on the bottom of the panel appears. It should indicate it didn't find symfony script
    1. Close project wizard Issue 168832
    2. Proceed with textcase Symfony automatic recognition Linux
    3. uninstall symfony
ubuntu example: 
$ sudo pear uninstall symfony/symfony-1.2.8
uninstall ok: channel://pear.symfony-project.com/symfony-1.2.8
    1. try to create symfony project again and verify expected result and the end of this testcase, Issue: 168837
    2. Proceed with textcase Symfony manual path entering Linux
    3. try to create symfony project again and verify expected result and the end of this testcase, Issue: 168837
    4. Proceed with textcase Symfony manual path entering Windows
    5. try to create symfony project again and verify expected result and the end of this testcase, Issue: 168837
    • EXPECTED RESULT: A file structure hierarchy should be created as stated below. Invoke project context menu and you should find symfony -> clear cache and/or symfony -> run command
|-- apps
|   `-- frontend
|       |-- config
|       |   |-- app.yml
|       |   |-- cache.yml
|       |   |-- factories.yml
|       |   |-- filters.yml
|       |   |-- frontendConfiguration.class.php
|       |   |-- routing.yml
|       |   |-- security.yml
|       |   |-- settings.yml
|       |   `-- view.yml
|       |-- i18n
|       |-- lib
|       |   `-- myUser.class.php
|       |-- modules
|       `-- templates
|           `-- layout.php
|-- cache
|   `-- project_autoload.cache
|-- config
|   |-- ProjectConfiguration.class.php
|   |-- databases.yml
|   |-- propel.ini
|   |-- properties.ini
|   |-- rsync_exclude.txt
|   |-- schema.yml
|   `-- vhost.sample
|-- data
|   `-- fixtures
|       `-- fixtures.yml
|-- doc
|-- lib
|-- log
|-- plugins
|-- symfony
|-- test
|   |-- bootstrap
|   |   |-- functional.php
|   |   `-- unit.php
|   |-- functional
|   |   `-- frontend
|   `-- unit
`-- web
    |-- css
    |   `-- main.css
    |-- frontend_dev.php
    |-- images
    |-- index.php
    |-- js
    |-- robots.txt
    |-- sfPropelPlugin -> ../../../../usr/share/php/symfony/plugins/sfPropelPlugin/web
    |-- sfProtoculousPlugin -> ../../../../usr/share/php/symfony/plugins/sfProtoculousPlugin/web
    `-- uploads
        `-- assets


  1. Symfony automatic recognition Linux
    1. Install symfony as a pear package. Note: you need to allow more than 256MB of memory for php command line script. Settings to be found in something/cli/php.ini where something stands for the path to php
ubuntu example: 
$ sudo pear channel-discover pear.symfony-project.com
[Sudo] password for felipee: 
Adding Channel "pear.symfony-project.com" succeeded
Discovery of channel "pear.symfony-project.com" succeeded
$ sudo pear install symfony/symfony-1.2.8
downloading symfony-1.2.8.tgz ...
Starting to download symfony-1.2.8.tgz (2,695,461 bytes)
..................................................done: 2,695,461 bytes
install ok: channel://pear.symfony-project.com/symfony-1.2.8
    1. open Tools -> Options -> PHP -> Symfony -> search
    • EXPECTED RESULT: script is found and path appears in text field
  1. Symfony manual path entering Linux
    1. Install symfony manually - what basically means download package or checkout from svn
    2. open Tools -> Options -> PHP -> Symfony -> Browse
    3. provide path to symfony/data/bin/symfony
    • EXPECTED RESULT: path should be accepted
  2. Symfony automatic recognition Windows
    1. install pear for windows if you don't have yet How To
c:\wamp\bin\php\php5.2.9-2>pear channel-discover pear.symfony-project.com
Adding Channel "pear.symfony-project.com" succeeded
Discovery of channel "pear.symfony-project.com" succeeded

c:\wamp\bin\php\php5.2.9-2>pear install symfony/symfony-1.2.8
downloading symfony-1.2.8.tgz ...
Starting to download symfony-1.2.8.tgz (2,695,461 bytes)
.........done: 2,695,461 bytes
install ok: channel://pear.symfony-project.com/symfony-1.2.8
    1. open Tools -> Options -> PHP -> Symfony -> search
    • EXPECTED RESULT: script is found and path appears in text field. If not, then verify you have path to PEAR in %PATH% system variable
  1. Symfony manual path entering Windows
    1. repeat steps for manual path entering for Linux, note: use only paths without spaces!
    2. provide path to symfony/data/bin/symfony.bat
    • EXPECTED RESULT: path should be accepted
  2. Symfony Project containing symfony sources
    1. download symfony sources
    2. unpack them to project_folder/lib/vendor/
    3. from command line call
 
$ php lib/vendor/symfony/data/bin/symfony generate:project PROJECT_NAME

On Windows:

c:\> php lib\vendor\symfony\data\bin\symfony generate:project PROJECT_NAME
    1. create project with existing sources that has sources and project folder in project_folder
    • EXPECTED RESULT: project should be recognized as symfony project. Verify by invoking project context menu and found symfony-> run command and/or symfony -> clear cache. The project folder tree will be as the one above but including symfony sources in lib/vendor/


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