public function createMyNode($type, $title)
    {
        if ($this->getUserManager()->currentUserIsAnonymous()) {
            throw new \Exception(sprintf('There is no current logged in user to create a node for.'));
        }

        $node = (object) array(
        'title' => $title,
        'type' => $type,
        'body' => $this->getRandom()->name(255),
        'uid' => $this->getUserManager()->getCurrentUser()->uid,
        );
        $saved = $this->nodeCreate($node);

        // Set internal page on the new node.
        $this->getSession()->visit($this->locatePath('/node/' . $saved->nid));
    }
public function createMyNode($type, $title)
    {
        if ($this->getUserManager()->currentUserIsAnonymous()) {
            throw new \Exception(sprintf('There is no current logged in user to create a node for.'));
        }

        $node = (object) array(
        'title' => $title,
        'type' => $type,
        'body' => $this->getRandom()->name(255),
        'uid' => $this->getUserManager()->getCurrentUser()->uid,
        );
        $saved = $this->nodeCreate($node);

        // Set internal page on the new node.
        $this->getSession()->visit($this->locatePath('/node/' . $saved->nid));
    }
public function createMyNode ( $ type , $ title ) { if ( $ this -> getUserManager ( ) -> currentUserIsAnonymous ( ) ) { throw new \ Exception ( sprintf ( 'There is no current logged in user to create a node for.' ) ) ; } $ node = ( object ) array ( 'title' => $ title , 'type' => $ type , 'body' => $ this -> getRandom ( ) -> name ( 255 ) , 'uid' => $ this -> getUserManager ( ) -> getCurrentUser ( ) -> uid , ) ; $ saved = $ this -> nodeCreate ( $ node ) ; // Set internal page on the new node. $ this -> getSession ( ) -> visit ( $ this -> locatePath ( '/node/' . $ saved -> nid ) ) ; }
Creates content authored by the current user.

@Given I am viewing my :type (content )with the title :title
Creates content authored by the current user .